{"id":"CVE-2026-46420","summary":"setup-php: Command Injection in Repository-Derived PHP Version Resolution","details":"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.","aliases":["GHSA-pqwm-q9pv-ph8r"],"modified":"2026-08-20T03:54:21.970669958Z","published":"2026-07-17T19:51:10.253Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46420.json"},"references":[{"type":"WEB","url":"https://github.com/shivammathur/setup-php/releases/tag/2.37.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46420.json"},{"type":"ADVISORY","url":"https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46420"},{"type":"FIX","url":"https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/shivammathur/setup-php","events":[{"introduced":"1fdc5e773bb54b5aa541c73679d6e9acc692d0cd"},{"fixed":"7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc"},{"fixed":"eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b"}],"database_specific":{"cpe":"cpe:2.3:a:shivammathur:setup_php:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"2.25.0"},{"fixed":"2.37.1"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["2.37.0","2.36.0","2.35.5","2.35.4","2.35.3","2.35.2","2.35.1","2.35.0","2.34.1","2.34.0","2.33.0","2.32.0","2.31.1","2.31.0","2.30.5","2.30.4","2.30.3","2.30.2","2.30.1","2.30.0","2.29.0","2.28.0","2.27.1","2.27.0","2.26.0","2.25.5","2.25.4","2.25.3","2.25.2","2.25.1","2.25.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46420.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}]}