CVE-2017-9841 · mitre
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 "<?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.
Published 2017-06-27, last changed 2026-06-17. Weakness: CWE-94.
CISA KEV
PHPUnit Command Injection Vulnerability. Added 2022-02-15, federal due date 2022-08-15, ransomware use: Unknown.
Public exploits
| Source | Kind | Reference |
|---|---|---|
| exploit-db | proof-of-concept | EDB-50702 |
| nuclei | scan-template | CVE-2017-9841 |
How to fix
Upgrade to a fixed version: phpunit/phpunit 4.8.28, 5.6.3 (Packagist) (each is the fix for its own release line). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in sebastianbergmann/phpunit by 284a69fb88, pull request #1956. Functions changed by the fix: runJob. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2017-06-27 | Published |
| 2022-02-15 | Added to CISA KEV: exploited in the wild |
| 2022-03-26 | Package advisory GHSA-r7c9-c69m-rph8 |
| 2022-08-15 | CISA KEV due date for US federal agencies |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 100.0% |
| 2026-11-30 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-r7c9-c69m-rph8 | phpunit/phpunit (Packagist) | 4.8.28 |
| GHSA-r7c9-c69m-rph8 | phpunit/phpunit (Packagist) | 5.6.3 |
Also known as: GHSA-r7c9-c69m-rph8
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2026-119193 | 2026-10-29 | 5.4 | PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling |
| CVE-2026-41570 | 2026-05-08 | 7.8 | PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes |
| CVE-2026-24765 | 2026-01-27 | 7.8 | PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling |
| CVE-2026-51832 | 2026-10-29 | 7.8 | same weakness (CWE-94) from the same CNA (mitre) |
| CVE-2026-51831 | 2026-10-29 | 7.8 | same weakness (CWE-94) from the same CNA (mitre) |
| CVE-2026-107050 | 2026-10-29 | 9.8 | same weakness (CWE-94) from the same CNA (mitre) |
| CVE-2026-78845 | 2026-10-27 | 9.8 | same weakness (CWE-94) from the same CNA (mitre) |
| CVE-2026-107091 | 2026-10-26 | 7.8 | same weakness (CWE-94) from the same CNA (mitre) |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2017-9841, or call /api/v1/vulnerabilities/CVE-2017-9841. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.