cbcvebase.
CVE-2017-9841
published 2017-06-27

CVE-2017-9841: 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…

PriorityP196critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
KEVITWEXPLOITInitial access
CISA Known Exploited Vulnerabilitydue 2022-08-15
Exploited in the wild
EPSS
100.00%
100.0th percentile
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.

Affected

14 ranges
VendorProductVersion rangeFixed in
debianphpunit< phpunit 5.4.6-2 (bookworm)phpunit 5.4.6-2 (bookworm)
drupaldrupal
oraclecommunications_diameter_signaling_router8.0.0 – 8.5.0
phpunitphpunit>= 4.8.19 < 4.8.284.8.28
phpunitphpunit>= 5.0.10 < 5.6.35.6.3
phpunit_projectphpunit<= 4.8.27
phpunit_projectphpunit>= 0 < 5.4.6-25.4.6-2
phpunit_projectphpunit>= 0 < 5.4.6-25.4.6-2
phpunit_projectphpunit>= 0 < 5.4.6-25.4.6-2
phpunit_projectphpunit>= 0 < 5.4.6-25.4.6-2
phpunit_projectphpunit>= 5.0.0 < 5.6.35.6.3
prestashopautoupgrade>= 4.0.0 < 4.10.14.10.1
prestashopgamification>= 0 < 2.3.22.3.2
prestashopps_facetedsearch>= 0 < 3.4.13.4.1

Detection & IOCsextracted from sources · hover to see the quote

path/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
path/api/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
path/app/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
filenameeval-stdin.php
commandHTTP POST with body beginning with "<?php "
  • Detect inbound HTTP POST requests targeting any path ending in /eval-stdin.php where the POST body begins with the string '<?php '. This is the canonical exploit payload for CVE-2017-9841.
  • Monitor for HTTP requests to the full list of known scanning paths for eval-stdin.php across common web root prefixes (e.g., /api/, /app/, /backup/, /blog/, /cms/, /laravel/, /public/, /vendor/, /www/, /yii/, /zend/, etc.).
  • Check whether the eval-stdin.php file on disk references 'php://input' (vulnerable) rather than 'php://stdin' (patched). Presence of php://input in this file confirms exploitability.
  • Review outgoing GET requests (via cURL) to external file hosting sites such as GitHub or Pastebin, especially when the request fetches a .php file — a common post-exploitation pattern following CVE-2017-9841 exploitation by Androxgh0st.
  • CVE-2017-9841 was the top exploited CVE by volume in March 2025 with 69,433 attempts recorded, indicating active mass-scanning campaigns. Treat any hit on eval-stdin.php paths as high-priority.
  • Androxgh0st botnet (Python-scripted malware) specifically exploits CVE-2017-9841 to gain initial access, then targets .env files for AWS, Office 365, SendGrid, and Twilio credentials. Correlate eval-stdin.php hits with subsequent .env file access attempts.
  • RedTail malware uses CVE-2017-9841 for payload delivery. ThreatFox tags this CVE with RedTail payload delivery infrastructure at confidence 85%.
  • ·The vulnerability only exists when the /vendor directory (and specifically eval-stdin.php) is publicly accessible from the internet. Environments where the vendor directory is blocked at the web server level are not directly exploitable via HTTP.
  • ·Even after upgrading or removing the Mailchimp/Mailchimp E-Commerce Drupal modules, artifact files including eval-stdin.php may remain on disk and remain exploitable.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
ghsa9.8CRITICAL
osv9.8CRITICAL
vulncheck9.8CRITICAL
cisa9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_oracle9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.