Read the docs
TI-2026-34133 Aliases CVE-2026-46420GHSA-pqwm-q9pv-ph8r

setup-php: Command Injection in Repository-Derived PHP Version Resolution

Priority MEDIUM 46CWE-78Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-78.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0201 80th percentileScored 2026-11-07
Fix Fixed setup-php (shivammathur): 2.37.1shivammathur/setup-php (GitHub Actions): 2.37.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
shivammathursetup-php2.25.0 to before 2.37.12.37.1Patch availableCNA
—shivammathur/setup-php (GitHub Actions)2.25.0 to before 2.37.12.37.1Patch availableGHSA-pqwm-q9pv-ph8r
  • setup-php Vendorshivammathur Affected 2.25.0 to before 2.37.1 Fixed in 2.37.1 Patch available CNA
  • shivammathur/setup-php (GitHub Actions) Vendor— Affected 2.25.0 to before 2.37.1 Fixed in 2.37.1 Patch available GHSA-pqwm-q9pv-ph8r

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:shivammathur:setup_php:*:*:*:*:*:*:*:*2.25.0 to before 2.37.1Vulnerableshivammathur
  • cpe:2.3:a:shivammathur:setup_php:*:*:*:*:*:*:*:* Versions 2.25.0 to before 2.37.1 Vulnerable ·shivammathur

Remediation

  • Fix · CNA setup-php (shivammathur) Fixed in 2.37.1
  • Fix · GHSA-pqwm-q9pv-ph8r shivammathur/setup-php (GitHub Actions) Fixed in 2.37.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-46420
  2. 2026-10-03 Alias added: GHSA-pqwm-q9pv-ph8r

References

Sources