Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 5.9, published 20 May 2026.
- Which products and versions are affected?
- shivammathur/setup-php (GitHub Actions) < 2.37.1.
- Is there a fix for This vulnerability?
- A patch was published on 2026-05-13: Fix committed to shivammathur/setup-php repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run shivammathur/setup-php (GitHub Actions) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The setup-php GitHub Action is vulnerable to sensitive information disclosure (CWE-532) when configured to use specific pinned versions of Composer (e.g., 2.9.7). The root cause is an underlying issue in Composer where newer GitHub token formats containing hyphens fail a regex validation check. When validation fails, Composer throws an UnexpectedValueException that interpolates the raw token into the error message, which is then printed to stderr and captured in GitHub Action logs. While GitHub-hosted runner tokens are short-lived, longer-lived GitHub App or user tokens may also be exposed. The vulnerability is mitigated in setup-php 2.37.1 by skipping GitHub OAuth configuration for known-affected Composer versions.
Affected products
- shivammathur shivammathur/setup-php < 2.37.1
Timeline
- 2026-05-13: patched: Fix committed to shivammathur/setup-php repository
- 2026-05-14: disclosed: Initial advisory publication
- 2026-05-20: advisory: Advisory reviewed and updated in GitHub Database
References
- https://github.com/composer/composer/security/advisories/GHSA-f9f8-rm49-7jv2
- https://github.com/shivammathur/setup-php/security/advisories/GHSA-5wxr-w449-57cm
- https://github.com/shivammathur/setup-php/commit/7748c243803a56671412f9f7c745769e9573c6d4
- https://api.github.com/repos/shivammathur/setup-php/security-advisories/GHSA-5wxr-w449-57cm