CVE-2026-46420
Full vulnerability record from the local CVENow database.
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.
Severity
CRITICAL
CVSS score
9.8
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-17 20:17:18.567000
Last modified
2026-10-24 20:10:00.137000
View original CVE JSON
{
"id": "CVE-2026-46420",
"sourceIdentifier": "[email protected]",
"published": "2026-07-17T20:17:18.567",
"lastModified": "2026-10-24T20:10:00.137",
"vulnStatus": "Analyzed",
"cveTags": [],
"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."
},
{
"lang": "es",
"value": "setup-php es una acción de GitHub para configurar PHP con extensiones, configuración de php.ini, controladores de cobertura y herramientas. Desde la versión 2.25.0 anterior a la 2.37.1, shivammathur/setup-php resuelve la versión de PHP de archivos controlados por el repositorio como .php-version, composer.lock a través de platform-overrides.php, y composer.json a través de config.platform.php, y restringe insuficientemente esos valores antes de incorporarlos en scripts de configuración de shell o PowerShell generados, permitiendo la inyección de comandos en un ejecutor de GitHub Actions cuando flujos de trabajo como pull_request_target extraen contenido controlado por el atacante antes de invocar setup-php. Este problema está solucionado en la versión 2.37.1."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "shivammathur",
"product": "setup-php",
"versions": [
{
"version": ">= 2.25.0, < 2.37.1",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L",
"baseScore": 5.6,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "HIGH",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"availabilityImpact": "LOW"
},
"exploitabilityScore": 2.2,
"impactScore": 3.4
},
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 9.8,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-20T18:09:22.675511Z",
"id": "CVE-2026-46420",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-78"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:shivammathur:setup_php:*:*:*:*:*:*:*:*",
"versionStartIncluding": "2.25.0",
"versionEndExcluding": "2.37.1",
"matchCriteriaId": "0D0E8588-0738-4350-B2E3-9C483ACC17A3"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/shivammathur/setup-php/releases/tag/2.37.1",
"source": "[email protected]",
"tags": [
"Product",
"Release Notes"
]
},
{
"url": "https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r",
"source": "[email protected]",
"tags": [
"Patch",
"Vendor Advisory"
]
}
]
}