{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-46420","id":"CVE-2026-46420","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","descriptionLong":"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.","published":"2026-07-17T19:51:10.253Z","updated":"2026-10-28T02:30:49.424837689Z","reserved":"2026-05-13T22:18:22.829Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.6,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.6,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.6,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":5.6,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"medium","source":"OSV"},{"version":"3.1","score":5.6,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"medium","source":"GitHub"}],"rating":"medium","products":["shivammathur setup-php"],"affectedProducts":[{"vendor":"shivammathur","product":"setup-php","defaultStatus":null,"versions":[{"version":">= 2.25.0, < 2.37.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"GitHub Actions","name":"shivammathur/setup-php","purl":null,"ranges":[">=2.25.0 <2.37.1"],"fixed":["2.37.1"],"advisory":"GHSA-pqwm-q9pv-ph8r"}],"cwes":["CWE-78"],"aliases":["GHSA-pqwm-q9pv-ph8r"],"references":[{"url":"https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r","tags":["x_refsource_CONFIRM","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/shivammathur/setup-php/releases/tag/2.37.1","tags":["x_refsource_MISC","Product","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46420.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46420","tags":["advisory"]},{"url":"https://github.com/shivammathur/setup-php","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0201,"epssPercentile":0.8129,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-46420","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46420","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-46420","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-pqwm-q9pv-ph8r","ok":true,"note":"GHSA-pqwm-q9pv-ph8r"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-46420","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}