CVE-2017-9841
Published: February 15, 2022
Official Description
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.
CISA KEV Advisory
PHPUnit Command Injection Vulnerability
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.
Apply updates per vendor instructions.
Risk Analysis
PHPUnit is vulnerable to remote code execution, allowing attackers to run arbitrary PHP code via specific HTTP POST data when the /vendor folder is exposed. Its high EPSS score of 0.94210 and inclusion in the KEV confirm its urgency and high likelihood of exploitation.
This vulnerability is actively exploited in the wild. The flaw is remotely exploitable via HTTP POST data if the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI is externally accessible.
Restrict external access to the /vendor folder, especially the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI. Apply any available patches or updates for PHPUnit to address this remote code execution vulnerability.
Technical Analysis
CVE-2017-9841 requires local access, meaning attackers must already have a foothold on the target system.
Exploitation requires some privileges, which limits the exposure to scenarios where an attacker has already gained initial access.
CISA has added CVE-2017-9841 to the Known Exploited Vulnerabilities (KEV) catalog, confirming active exploitation in the wild. U.S. federal agencies are required to patch this within the mandated timeframe, and all organizations should treat remediation as urgent.
Affected Vendors & Products
Exploit & PoC Resources
All References (1)
Quick Facts
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2017-9841 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts
- !CISA KEV: Federal agencies must patch per BOD 22-01 timeline
- !Active exploitation confirmed — treat as P1