CVE-2017-9841: PHPUnit Command Injection Vulnerability
Vulnerability summary
CVE-2017-9841 is a critical (CVSS 9.8) Code Injection vulnerability in PHPUnit. It is known to be exploited: CISA lists it, first on 15-02-2022. EPSS estimates a 100.00% chance of exploitation in the next 30 days, higher than 99.9% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 1Timeline
- 27-06-2017PublishedVulnerability first disclosed.
- 15-02-2022Added to CISA KEVPHPUnit Command Injection Vulnerability
- 15-08-2022CISA remediation dueApply updates per vendor instructions.
- 21-10-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 4 sources · 2 versions- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
100.00%
Chance of exploitation in the next 30 days
Percentile
100%
Versus all other CVEs
30-day change
0.00 pp
From 100.00% on 18-09-2026
Known exploited
Compare KEV catalogs- Added
- 15-02-2022
- Federal due date
- 15-08-2022
CISA required action
Apply updates per vendor instructions. nvd.nist.gov/vuln/detail/CVE-2017-9841
Public exploits
1 foundPHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Debian1 product
- phpunit< 5.4.6-2
Oracle1 product
- communications_diameter_signaling_router≥ 8.0.0, ≤ 8.5.0
Phpunit_project1 product
- phpunit≤ 4.8.27 | ≥ 5.0.0, < 5.6.3
Ubuntu1 product
- phpunit< 5.1.3-1+ubuntu3+esm1
4 vendors · 4 products
References
14 links- github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5X Refsource MISCPatchThird Party AdvisoryREPORT
- web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/X Refsource MISCThird Party Advisory
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841Government ResourceUS Government Resource
- phpunit.vulnbusters.comREPORT