{"id":"CVE-2026-46420","state":"PUBLISHED","title":"setup-php: Command Injection in Repository-Derived PHP Version Resolution","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.","publishedAt":"2026-07-17T19:51:10.253Z","updatedAt":"2026-07-20T18:15:56.324Z","severity":{"score":5.6,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["shivammathur setup-php"],"affected":[{"vendor":"shivammathur","product":"setup-php","versions":[{"version":">= 2.25.0, < 2.37.1","status":"affected"}]}],"references":["https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r","https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b","https://github.com/shivammathur/setup-php/releases/tag/2.37.1"],"weaknesses":["CWE-78"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46420.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46420","state":"PUBLISHED","datePublished":"2026-07-17T19:51:10.253Z","dateUpdated":"2026-07-20T18:15:56.324Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-13T22:18:22.829Z"},"containers":{"cna":{"title":"setup-php: Command Injection in Repository-Derived PHP Version Resolution","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"shivammathur","product":"setup-php","versions":[{"version":">= 2.25.0, < 2.37.1","status":"affected"}]}],"references":[{"url":"https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r","name":"https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b","name":"https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b","tags":["x_refsource_MISC"]},{"url":"https://github.com/shivammathur/setup-php/releases/tag/2.37.1","name":"https://github.com/shivammathur/setup-php/releases/tag/2.37.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":5.6,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","lang":"en","description":"CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-17T19:51:10.253Z"},"source":{"advisory":"GHSA-pqwm-q9pv-ph8r","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-20T18:09:22.675511Z","id":"CVE-2026-46420","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-20T18:15:56.324Z"}}]}}}