CVE-2017-9841
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…
- Published
- Updated
- Reserved
- Assigned by
- mitre
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as PHPUnit Command Injection Vulnerability.
- Added
- 15 Feb 2022
- Fix due (US federal)
- 15 Aug 2022
- Used by ransomware
- Not known
Apply updates per vendor instructions.
ENISA's EU Vulnerability Database lists it as exploited, from CISA's KEV, since 15 Feb 2022.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Nuclei template and an Exploit-DB entry for it. CISA's SSVC rates its exploitation: it is being exploited.
Nuclei templates1 template
- PHPUnit - Remote Code Execution (Nuclei template) (opens in a new tab)
http/cves/2017/CVE-2017-9841.yamlSeverity critical
Exploit-DB1 entry
- PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated) (Exploit-DB entry) (opens in a new tab)
EDB-ID 50702webapps, phppublished 2 Feb 2022Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By mitre
- 3 days later
· 3 days later
Published
- 5 years later
· 5 years later
Added to CISA KEV
Known exploited in the wild
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 100.0% · top 0.1% of all CVEs (9 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: yes · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Weakness
Affected products
n/a
- affected n/a
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistphpunit/phpunitGHSA-r7c9-c69m-rph8 (opens in a new tab)
References (8)
- 101798 (opens in a new tab)vdb-entryx_refsource_BIDx_transferred
- 1039812 (opens in a new tab)vdb-entryx_refsource_SECTRACKx_transferred
- GLSA-201711-15 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- https://www.oracle.com/security-alerts/cpuoct2021.html (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/sebastianbergmann/phpunit/pull/1956 (opens in a new tab)x_refsource_MISCx_transferred
- http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/ (opens in a new tab)x_refsource_MISCx_transferred
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841 (opens in a new tab)government-resource
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-1528 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-r7c9-c69m-rph8 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2017-9841)Record last updated .