PHPUnit - RCE (CVE-2017-9841)
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.
psychologyCrowdSec Analysis
CVE-2017-9841 is a critical vulnerability in PHPUnit that allows remote attackers to execute arbitrary PHP code by accessing a test script inadvertently left exposed in web-accessible locations.
CrowdSec has been tracking this vulnerability and its exploits since 15th of December 2023.
Based on data from the CrowdSec network, nearly all observed exploitation of CVE-2017-9841 is fully opportunistic, with attackers indiscriminately scanning the entire internet. These attacks are automated and lack any form of target selection or reconnaissance. Additionally, according to week-over-week analysis by CrowdSec, exploitation of CVE-2017-9841 is surging. Attack volumes are spiking well above historical norms, indicating widespread and escalating interest from threat actors. CVE-2017-9841 is currently experiencing high visibility and active exploitation across the internet.
Attack attempts are characterized by requests to URLs ending in /vendor/phpunit/phpunit/src/util/php/eval-stdin.php.
Full Intelligence Available
Connect your API key to access CrowdSec scores, exploit timelines, and attacker IPs.
| Event | Date |
|---|---|
| CVE Published | 2017-06-27 |
| CISA KEV | 2022-02-15 |
| CISA Remediation Deadline | 2022-08-15 |
| Rule Released | 2023-12-15 |
| CrowdSec First Seen | 2023-12-15 |
Remediation & Protection
External References
- https://security.gentoo.org/glsa/201711-15
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5
- https://github.com/sebastianbergmann/phpunit/pull/1956
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-9841.yaml