CVE-2017-9841
Code Injection in PHPUnit
Reported by mitre · Published June 27, 2017
phpunit/phpunit is fixed in 5.6.3 and 4.8.28 (Packagist)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| phpunit/phpunit | Packagist | 5.6.3, 4.8.28 |
| mediawiki | Arch Linux | 1.28.3-1 |
| phpunit | phpunit_project | 5.6.3, 4.8.27 |
| communications_diameter_signaling_router | oracle | 8.5.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| arch | mediawiki | 0 |
| phpunit | phpunit | 4.8.19, 5.0.10 |
| n/a | n/a | * |
Timeline
- Jun 27, 2017 CVE Published
- May 18, 2020 VulnCheck XDB Entry (17 in total, the first dated here)
- Nov 22, 2020 VulnCheck KEV Exploitation (1119 in total, the first dated here)
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Oct 27, 2021 PoC Published (544 in total, the first dated here)
- Feb 15, 2022 CISA KEV Added
- Mar 6, 2026 Distribution Patch
- Mar 6, 2026 Security Advisory (3 in total, the first dated here)
- Sep 27, 2026 Coalition ESS Score
- Nov 8, 2026 CrowdSec Sighting (39 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2017-9841
vulnetix vdb fixes CVE-2017-9841
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-9841/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- 101798 vdb-entryx_refsource_BID
- 1039812 vdb-entryx_refsource_SECTRACK
- GLSA-201711-15 vendor-advisoryx_refsource_GENTOO
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2017-9841 advisory
- https://github.com/advisories/GHSA-r7c9-c69m-rph8 advisory
- https://github.com/sebastianbergmann/phpunit/pull/1955 patch
- https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412 patch
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml url
- https://github.com/sebastianbergmann/phpunit url
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841 url