CVE-2017-9841
CVE-2017-9841 — PHPUnit Command Injection Vulnerability
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.
Published Updated Sources: NVD, PHPUnit (CNA), CISA, FIRST EPSS, GitHub, GitHub Security Advisory, Exploit-DB, Red Hat (VEX), SOCRadar CTI
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Confirmed
CISA KEV, listed Feb 15, 2022
EPSS
100%
top of FIRST's scoreset
CVSS base
9.8
critical · 4 sources
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
Active
none · proof-of-concept · active
Automatable
Yes
can an attacker script all four kill-chain steps
Technical impact
Total
partial · total control of the vulnerable component
Remediation
The vendor's own words where we have them.
Upgrade phpunit/phpunit to 4.8.28 or later (composer advisory GHSA-r7c9-c69m-rph8).
CISA required action
Apply updates per vendor instructions.
Federal deadline Aug 15, 2022 — passed 1,572 days ago
Red Hat VEX · CVE-2017-9841
First 24 hours
Ordered from the record's own fields — exposure first, because you cannot patch what you have not found.
- Identify exposed assets running affected vendor/product/version combinations.
- Treat as emergency remediation because CISA KEV status is present.
- Search available logs for exploit probes, errors, authentication anomalies, or suspicious child processes matching the vulnerability class.
Affected scope
Vendor, product and version as the advisories word them.
| Vendor | Product | Versions | Status |
|---|---|---|---|
| PHPUnit | PHPUnit | n/a | Vulnerable |
| Composer | phpunit/phpunit | >= 4.8.19, < 4.8.28 | Vulnerable |
| Composer | phpunit/phpunit | >= 5.0.10, < 5.6.3 | Vulnerable |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Availability
High
Confidentiality
High
Integrity
High
Scope
Unchanged
Attack Complexity
Low
Attack Vector
Network
Privileges Req
None
User Interaction
None
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 9.8 | CVSS 3.1 | critical | 3.9 | 5.9 | NVD, CNA |
| 7.5 | CVSS 2.0 | high | 10 | 6.4 | NVD |
| 9.8 | CVSS 3.1 | critical | n/a | n/a | GHSA |
| 8.8 | CVSS 3.1 | high | n/a | n/a | Red Hat (VEX) |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What this weakness leads to
MITRE's own consequences and mitigations for the weakness class — the authority's wording, not guidance derived from the CVSS vector.
CWE-94 · Improper Control of Generation of Code ('Code Injection')
- Bypass Protection Mechanism
- Gain Privileges or Assume Identity
- Execute Unauthorized Code or Commands
- Hide Activities
Mitigation: Refactor your program so that you do not have to dynamically generate code.
Weakness & attack patterns
- CWE-94Code Injection
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1027.006Obfuscated Files or Information: HTML Smuggling
- T1027.009Obfuscated Files or Information: Embedded Payloads
- T1564.009Hide Artifacts: Resource Forking
CISA KEV details
CISA lists a CVE here once it has evidence of exploitation against real targets.
Listed
Feb 15, 2022
Federal deadline
Aug 15, 2022
passed 1,572 days ago
Ransomware use
Unknown
CISA records ransomware use only for campaigns it has confirmed, so “Unknown” means unrecorded, not ruled out. The deadline binds US federal agencies; for everyone else it is a date to argue against.
Public exploit
Capability, not use: code existing is a different claim from anyone running it.
PoC repos
129
1 of the 5 sampled are weaponized
Exploit entries
20
Exploit-DB and CTI exploit indexes
Malware
Families a CTI source ties to this CVE. One named, with the total it tracks.
Families tracked
3
Named
mozi
elf.mozi, Mozi
Social mentions
Posts naming this CVE. Attention, not evidence of exploitation — it spikes on disclosure and decays whether or not anything is exploited.
A flaw from 2017 is the most used exploit against our honeypots. PHPUnit (CVE-2017-9841) and Laravel Ignition (CVE-2021-3129): 1,313 attempts on one decoy in two days. Is your vendor folder public? https://t.co/EMzu58C2kb #infosec #PHP #Laravel #honeypot
@olizimmermann· Nov 20, 2026
Semana del 23 al 29 de octubre en mis honeypots (10 sensores, 5 países): La actividad subió un 67 % frente a la semana anterior. 75 CVE buscados, 34 explotados ya según CISA. Top: CVE-2017-9841 (PHPUnit). #ciberseguridad #threatintel #honeypot https://t.co/0G4VzhFNf3
@michaca94· Oct 30, 2026
@UK_Daniel_Card Just for info: I retuned my honeypot last night, based on what we know right now, and guess what .. you'd better check your estate for CVE-2017-9841 🤷 https://t.co/pZTuW1X3eA
@CisoDiagonal· Oct 26, 2026
Their job against us isn't map scraping. It's commodity mass-exploitation: • PHPUnit CVE-2017-9841 (64) • F5 BIG-IP CVE-2023-46747 • Apache CVE-2021-42013 • NetScaler SAML, PHP-CGI UAs: spoofed iPhone + Mac Chrome, libredtail-http. Nothing announces itself honestly.
@Huntbackio· Oct 5, 2026
🛡️ Mis honeypots en 7 días: 499.519 eventos desde 6.018 IPs (▲49 %). Un ataque cada 1,2 s. Una IP de 🇺🇸 Estados Unidos pasó por 7 sensores de 5 países en 23,7 horas. Lo más atacado: Telnet, SMB y MySQL. CVE más buscado: CVE-2017-9841. #ciberseguridad #honeypot #CTI
@michaca94· Sep 18, 2026
2 more posts on this CVEShowing 5 of 7 · Who is discussing this CVE, and how loudlyUnlock freeDetection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /PHP/eval-stdin.php, /vendor, /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php.
- Prioritize edge telemetry for network-reachable PHPUnit, Phpunit/phpunit.
- Monitor for scanner or exploit-pattern traffic after 149 public PoC repositories were reported.
Groups associated with this CVE
Groups reported in connection with this vulnerability. A reported association, not a confirmed observation of that group using it — and not scoped to any sector or campaign.
- ip185.177.72.5176
SOCRadar Threat Exchange Services · Aug 27, 2025
- urlhttp://77.239.124.167/s86
AlienVault OTX Feeds · Nov 8, 2026
- urlhttp://77.239.124.167:23413/k/a56f1a4933ad0bca/s86
AlienVault OTX Feeds · Nov 8, 2026
- ip185.177.72.6870
AbuseIPDB Hourly Update · Jan 10, 2026
- ip138.197.16.1457
Collective Intelligence Network Security-Firehol · Mar 19, 2024
5 more indicators on this CVEShowing 5 of 10 · Hashes, addresses and domains from a live threat exchangeUnlock freeTimeline
What happened to this CVE, newest first — with the readings a source repeats on a schedule counted underneath rather than listed.
- 2026
Added · CVSS 3.1 9.8 (AV:N)
Jun 17, 2026 · NVD
Cve is exploited krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-PoC
Jun 11, 2026 · SOCRadar CTI
- 2022
Added · GHSA-r7c9-c69m-rph8 published (critical)
Mar 26, 2022 · GitHub Security Advisory
Added to CISA KEV catalog
Feb 15, 2022 · CISA
Added · webapps entry: PHP Unit 4.8.28 - Unauthenticated Remote Code Execution (RCE)
Feb 2, 2022 · Exploit-DB
- 2017
Initial · CVE published
Jun 27, 2017 · NVD
Source activity
Readings a source repeats on a schedule, counted rather than listed.
- 15×Tweets · 1 time tweeted.Jan 20, 2026 – Nov 21, 2026 · SOCRadar CTI
- 6×SVRS was changedMar 2, 2026 – Oct 29, 2026 · SOCRadar CTI
- 4×Github ReposMar 1, 2026 – Oct 8, 2026 · SOCRadar CTI
- 3×TelegramJan 26, 2026 – Sep 15, 2026 · SOCRadar CTI
References
16 on the record
- web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/
Third Party Advisory, Vendor Advisory, MITRE_REFERENCES, NIST, GITHUB
- www.securityfocus.com/bid/101798
Broken Link, NIST, Mitre
- www.securitytracker.com/id/1039812
Broken Link, NIST, Mitre
- github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5
Patch, Third Party Advisory, NIST, MITRE_REFERENCES
- github.com/sebastianbergmann/phpunit/pull/1956
Patch, Third Party Advisory, NIST, MITRE_REFERENCES
- security.gentoo.org/glsa/201711-15
Third Party Advisory, Mitre, NIST
- www.oracle.com/security-alerts/cpuoct2021.html
Patch, Third Party Advisory, GITHUB, NIST
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841
US Government Resource
Coverage
7 stories from the feeds we poll
HONG KONG CYBERSECURITY THREAT INTELLIGENCE REPORT - cyfirma
cyfirma.com · Apr 3, 2026
Government Remains Primary Target as Cyberattacks Grow in 2025
cysecurity.news · Mar 28, 2026
SINGAPORE THREAT LANDSCAPE - cyfirma
cyfirma.com · Mar 23, 2026
Cybercriminals scale up, government sector hit hardest - Help Net Security
helpnetsecurity.com · Mar 18, 2026
Zerobot Malware Exploiting Tenda Command Injection Vulnerabilities to Deploy Malware
cybersecuritynews.com · Mar 3, 2026
2 more reports on this CVEShowing 5 of 7 · Vendor research and security press coverageUnlock freeRelated CVEs
Same product first, then the same weakness or threat actor.
- CVE-2025-32432 Craft CMS Allows Remote Code ExecutionCVSS 10.0 · CISA KEV
- CVE-2024-4040 CrushFTP VFS Sandbox Escape VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2022-24816 Improper Control of Generation of Code in jai-extCVSS 10.0 · CISA KEV
- CVE-2022-22947 VMware Spring Cloud Gateway Code Injection VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2021-22205 GitLab Community and Enterprise Editions Remote Code Execution VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2019-7609 Kibana Arbitrary Code ExecutionCVSS 10.0 · CISA KEV
Elsewhere on this site
- PHPUnitevery CVE for this vendor
- Composerevery CVE for this vendor
- PHPUnitevery page on this product
- February 2022what else CISA listed
- Remote Code Execsame class
- CWE-94other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- Only the 5 indicator(s) reported for this CVE are available; no packet-level or host-forensic artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record1
What should defenders know first?
CVE-2017-9841 is PHPUnit Command Injection Vulnerability, a critical vulnerability affecting PHPUnit, Phpunit/phpunit from PHPUnit, Composer. The current evidence lists it in CISA KEV, and the exploit status is: Yes: CISA KEV signal present. Public exploit evidence is: 149 public PoC repositories reported; 1 marked weaponized in current dataset. The affected-version evidence is listed in the key facts and affected products tables. Defenders should first verify whether exposed or business-critical assets run those versions, then apply vendor patches or mitigations, restrict reachable attack surface, and preserve logs for detection review. CVSS 9.8 describes technical severity, while EPSS 100% helps estimate near-term exploit likelihood; neither replaces asset context. Unknown fields should remain explicit in tickets, and threat actor, IOC, victimology, or payload claims should not be added unless a cited source supports them. Monitor CISA KEV, vendor advisories, NVD changes, public PoC repositories, and internal telemetry for update triggers.