Code injectionin PHPUnit.
On CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks.'s exploited list since 15 Feb 2022.
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.
CISA: PHPUnit 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.
- Upgrade phpunit/phpunit (Packagist) to 4.8.28, 5.6.3 or later, whichever matches your release line.
- CISA requires US federal agencies to fix it by 15 Aug 2022.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 24 Jun 2017CVE ID reserved by mitre.
- 27 Jun 2017Published in the CVE List.
- 18 May 2020First public proof of concept on GitHub.
- 15 Feb 2022Added to CISA's Known Exploited Vulnerabilities list.
- 21 Oct 2025CVE record last updated.
Attack code anyone can find
Exploit maturity: Exploited in the wild (CISA KEV). CISA assessment (SSVC): exploitation active.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Same weakness: Code injection
- www.securityfocus.com vdb-entry, x_refsource_BID
- www.securitytracker.com vdb-entry, x_refsource_SECTRACK
- security.gentoo.org vendor-advisory, x_refsource_GENTOO
- www.oracle.com x_refsource_MISC
- github.com x_refsource_MISC
- github.com x_refsource_MISC
- web.archive.org x_refsource_MISC
- www.cisa.gov government-resource
Patchminder. CVE-2017-9841: Code injection in PHPUnit. https://patchminder.com/cve/cve-2017-9841/ (accessed 5 December 2026).