CVE-2026-46420: shivammathur setup-php · OS Command Injection
Affects shivammathur setup-phpSource CVE Database V5
Not known to be exploited · CVSS 5.6 Medium : upgrade to 2.37.1 when convenient.
Data as of 30 Nov 2026, 18:37 UTC
- EPSS
- 2.0% chance of exploitation in 30 days – higher than 81% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.37.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:LExploitation evidence
Disclosed: evidence found.
CVE published 17 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 30 Nov 2026.
What to do
Upgrade setup-php and shivammathur/setup-php to 2.37.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| shivammathursetup-php | Affected
| Fixed in
|
| GitHub Actionsshivammathur/setup-php | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to version 2.37.1 or later where this vulnerability is fixed. Until then, avoid running setup-php in workflows that check out untrusted or attacker-controlled repository content, especially in pull_request_target events. Patch status is confirmed fixed in 2.37.1.
Description
setup-php is a GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and tools. From 2.25.0 prior to 2.37.1, shivammathur/setup-php resolves the PHP version from repository-controlled files such as .php-version, composer.lock through platform-overrides.php, and composer.json through config.platform.php, and insufficiently constrains those values before incorporating them into generated shell or PowerShell setup scripts, allowing command injection on a GitHub Actions runner when workflows such as pull_request_target check out attacker-controlled contents before invoking setup-php. This issue is fixed in version 2.37.1.