Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote…
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 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Active
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | phpunit/phpunit (Packagist) | 4.8.19 to before 4.8.28 | 4.8.28 | Patch available | GHSA-r7c9-c69m-rph8 |
| — | phpunit/phpunit (Packagist) | 5.0.10 to before 5.6.3 | 5.6.3 | Patch available | GHSA-r7c9-c69m-rph8 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- phpunit/phpunit (Packagist) Vendor— Affected 4.8.19 to before 4.8.28 Fixed in 4.8.28 Patch available GHSA-r7c9-c69m-rph8
- phpunit/phpunit (Packagist) Vendor— Affected 5.0.10 to before 5.6.3 Fixed in 5.6.3 Patch available GHSA-r7c9-c69m-rph8
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:*:*:* | up to 4.8.27; 5.0.0 to before 5.6.3 | Vulnerable | Phpunit Project |
| cpe:2.3:a:oracle:communications_diameter_signaling_router:*:*:*:*:*:*:*:* | 8.0.0 – 8.5.0 | Vulnerable | Oracle |
- cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:*:*:* Versions up to 4.8.27; 5.0.0 to before 5.6.3 Vulnerable ·Phpunit Project
- cpe:2.3:a:oracle:communications_diameter_signaling_router:*:*:*:*:*:*:*:* Versions 8.0.0 – 8.5.0 Vulnerable ·Oracle
Remediation
- Fix · GHSA-r7c9-c69m-rph8 phpunit/phpunit (Packagist) Fixed in 4.8.28 Advisory →
- Fix · GHSA-r7c9-c69m-rph8 phpunit/phpunit (Packagist) Fixed in 5.6.3 Advisory →
Vendor assessments
Timeline
- 2022-02-15 Added to CISA KEV
- 2026-10-02 Threatist record created from CVE-2017-9841
- 2026-10-03 Alias added: GHSA-r7c9-c69m-rph8
References
Patch 3
Advisory 3
Other 6
- https://github.com/sebastianbergmann/phpunit/pull/1955
- https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml
- https://github.com/sebastianbergmann/phpunit
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841
- http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com
Sources
- CVE-2017-9841 · CVE Program
- CVE-2017-9841 · NVD
- CISA Known Exploited Vulnerabilities
- FIRST EPSS
- GHSA-r7c9-c69m-rph8 · GitHub Advisory Database · CC BY 4.0
- CVE-2017-9841 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences