Actively exploited · Published Jun 27, 2017 · Assigned by mitre
CVE-2017-9841
Critical 9.8 Exploited
In plain English
A critical-severity code injection in PHPUnit from PHPUnit. Attackers are actively exploiting it in the wild (listed by CISA on February 15, 2022). The chance it is exploited in the next 30 days is estimated at 100.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
CISA guidance
Apply updates per vendor instructions.
Federal agencies must remediate by Aug 15, 2022.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | phpunit | 5.4.6-2 | DEBIAN-CVE-2017-9841 |
| Debian:13 | phpunit | 5.4.6-2 | DEBIAN-CVE-2017-9841 |
| Debian:14 | phpunit | 5.4.6-2 | DEBIAN-CVE-2017-9841 |
| Packagist | phpunit/phpunit | 4.8.28 | GHSA-r7c9-c69m-rph8 |
| Packagist | phpunit/phpunit | 5.6.3 | GHSA-r7c9-c69m-rph8 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- 101798 vdb-entry, x_refsource_BID
- 1039812 vdb-entry, x_refsource_SECTRACK
- GLSA-201711-15 vendor-advisory, x_refsource_GENTOO
- https://www.oracle.com/security-alerts/cpuoct2021.html x_refsource_MISC
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5 x_refsource_MISC
- https://github.com/sebastianbergmann/phpunit/pull/1956 x_refsource_MISC
- http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/ x_refsource_MISC
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841 government-resource