CVE-2017-9841: PHPUnit Command Injection Vulnerability
CVE-2017-9841 is a critical-severity flaw (CVSS 9.8) affecting phpunit, communications diameter signaling router, reported as exploited in the wild. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- EPSS top 1%: very likely to be exploited
- Exploited in the wild (CISA KEV)
- Public exploit reference
- CISA SSVC: automatable with total technical impact
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 100.0% (top 1%) |
| CISA exploited list | Yes, fix due 2022-08-15 |
| Weakness | CWE-94 |
| Published | 2017-06-27 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Exploited Added to the CISA Known Exploited Vulnerabilities list
- Deadline CISA due date for US federal agencies to patch
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: RandomRobbieBF/phpunit-brute (29 stars)
- GitHub PoC: incogbyte/laravel-phpunit-rce-masscaner (23 stars)
- GitHub PoC: Chocapikk/CVE-2017-9841 (7 stars)
- Write-up: www.oracle.com/security-alerts/cpuoct2021.html
- GitHub PoC: Jhonsonwannaa/CVE-2017-9841-
- Exploit-DB: PHP Unit 4.8.28 - Unauthenticated Remote Code Execution (RCE)
- Nuclei scan template: PHPUnit - Remote Code Execution
Advisories and coverage
Official advisories
- F5 Security Advisories: Cyberattacks Targeting South Africa, January through June 2021 2021-09-11
Research and news
- VulnCheck Blog: 9 Year-Old PHP Vulnerability Keeps Swinging As One of the Most Targeted Vulnerabilities 2026-05-19
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2017-9841?
phpunit: upgrade to 5.6.3; communications diameter signaling router: upgrade to newer than 8.5.0. Exact commands for each OS are on this page.
Is CVE-2017-9841 being exploited?
Yes. CVE-2017-9841 is on the CISA Known Exploited Vulnerabilities list, so treat it as patch-now.
What does CVE-2017-9841 affect?
CVE-2017-9841 affects phpunit, communications diameter signaling router. Severity is critical (CVSS 9.8). 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 /vend
How urgent is CVE-2017-9841?
Priority 97/100. Critical severity; EPSS top 1%: very likely to be exploited; Exploited in the wild (CISA KEV); Public exploit reference; CISA SSVC: automatable with total technical impact; Remotely exploitable, no login, no user action
Software pages
Related CVEs
- CVE-2026-41570 HIGH 7.8 DOWNGRADE PHPUnit is a testing framework for PHP
- CVE-2026-24765 HIGH 7.8 UPGRADE MITIGATE PHPUnit is a testing framework for PHP
- CVE-2013-4744 MEDIUM 4.3 UPGRADE Cross-site scripting (XSS) vulnerability in the PHPUnit extension before 3.5.15 for TYPO3 allows remote attack