Skip to main content
VulnerabilityPublished Updated

CVE-2026-46420: shivammathur setup-php · OS Command Injection

Affects shivammathur setup-phpSource CVE Database V5

0
Compare

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

CVSS 3.1 base score
5.6Medium
How severe the flaw is on the 0–10 CVSS scale.
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:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 17 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
shivammathursetup-phpAffected
  • >=2.25.0 <2.37.1
Fixed in
  • 2.37.1
GitHub Actionsshivammathur/setup-phpAffected
  • >=2.25.0 <2.37.1
Fixed in
  • 2.37.1

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.

References

Community reviews

Loading reviews…