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.
- CVSS
- 9.8Criticalscored by CISA
- Exploited in the wild
- Yes, in CISA KEV since 15 Feb 2022CISA deadline for US federal agencies: 15 Aug 2022public exploit code
- EPSS
- > 99.9%chance of exploitation in the next 30 daystop 0.1% of scored CVEsFIRST score of 11 Nov 2026
- Fix
- Patch availablesee the advisories in the references
- Published
- 27 Jun 2017analysed here 12 Nov 2026
Do first. Apply updates per vendor instructions. (CISA's required action for this KEV entry)
Summary
Triage
The summary, impact and action text on this page are written by our AI analysis pipeline, or taken from the NVD description when a CVE was imported from NVD. They are not the vendor's wording: check them against the sources. A longer AI executive summary and technical analysis are generated for signed-in accounts on the Max plan.
Affected products
Products named in our analysis
- phpunit_project:phpunit
- oracle:communications_diameter_signaling_router
Fix and mitigation
WAF and other mitigations
Can a WAF block it? Partly. Code injection payloads are often obfuscated, so they slip past generic WAF rules.
Also consider: remove eval sinks · RASP
Based on the weakness type only; no CVE-specific evidence yet. We check Cloudflare, AWS, Google Cloud Armor and Azure; for Akamai, Imperva, Fastly, F5, ask your vendor.
Remediation steps (AI-written)
Step-by-step remediation is generated for accounts on the Max plan, for CVEs that match a technology in their stack. Add this technology to your stack to see the fix checklist.
Exploitation evidence
- CISA KEV catalog
- Listed since 15 Feb 2022.
- CISA due date
- 15 Aug 2022, the remediation deadline for US federal agencies
- CISA required action
- Apply updates per vendor instructions.
- Public exploit code
- Yes: 1 on Exploit-DB · 18 GitHub proofs of concept · 1 Nuclei template
- CISA SSVC
- exploitation active, automatable yes, technical impact totalAssessed by CISA 7 Feb 2025 (SSVC 2.0.3). Exploitation is none, poc (public proof of concept) or active.
Exploit-DB
- PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)webapps, 2 Feb 2022
Nuclei
- PHPUnit - Remote Code Executiondetection template, critical
GitHub proofs of concept
- RandomRobbieBF/phpunit-brute29 stars
- incogbyte/laravel-phpunit-rce-masscaner23 stars
- Chocapikk/CVE-2017-98417 stars
- ludy-dev/PHPUnit_eval-stdin_RCE6 stars
and 14 more repositories
Listed so you can judge urgency, not as a recommendation to run anything. GitHub “proofs of concept” are unvetted: some are fake or carry malware. Exploit-DB marks the entries its staff verified.
Timeline
- 27 Jun 2017Published
- 6 Jan 2020First public exploit or proof of concept922 days (about 3 years) later
- 15 Feb 2022Added to CISA KEV (exploited in the wild)771 days (about 2 years) later
- 15 Aug 2022CISA remediation due date (US federal agencies)181 days (about 6 months) later
- 7 Feb 2025CISA SSVC assessment: exploitation active908 days (about 2 years) later
- 21 Oct 2025CVE record last updated256 days (about 9 months) later
- 12 Nov 2026Analysed by vulneraibility.com387 days (about 1 year) later
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Metric | Value | What it means |
|---|---|---|
| Attack vector | NetworkReachable over the internet or any routable network. | Reachable over the internet or any routable network. |
| Attack complexity | LowRepeatable attack, no special conditions. | Repeatable attack, no special conditions. |
| Privileges required | NoneThe attacker needs no prior access. | The attacker needs no prior access. |
| User interaction | NoneNo victim action needed. | No victim action needed. |
| Scope | UnchangedImpact stays within the vulnerable component. | Impact stays within the vulnerable component. |
| Confidentiality | HighTotal data disclosure possible. | Total data disclosure possible. |
| Integrity | HighComplete modification possible. | Complete modification possible. |
| Availability | HighFull outage possible. | Full outage possible. |
Common questions
Is CVE-2017-9841 being exploited?
Yes. CVE-2017-9841 appears in CISA's Known Exploited Vulnerabilities catalog, which means exploitation in the wild has been confirmed and reported. Treat it as active rather than theoretical, and patch it ahead of higher-scoring vulnerabilities that carry no exploitation evidence.
How severe is CVE-2017-9841?
CVE-2017-9841 is rated Critical with a CVSS score of 9.8. Severity describes how bad exploitation would be, not how likely it is: pair it with exploitation evidence before deciding what to patch first.
Is there a patch for CVE-2017-9841?
Yes. A fix has been recorded for CVE-2017-9841. The vendor advisory is the authority on the exact fixed version — apply it from there rather than from a summary.
What does CVE-2017-9841 affect?
CVE-2017-9841 affects phpunit_project:phpunit, oracle:communications_diameter_signaling_router. Confirm the exact affected versions against the vendor advisory before deciding you are exposed.
Exploitation status reflects CISA's KEV catalog as we last synced it. Check the catalog directly.
References
8 references in the CVE record, grouped by the tags the record gives them.
Advisories (1)
- security.gentoo.org /glsa/201711-15
Other links (7)
- securityfocus.com /bid/101798
- securitytracker.com /id/1039812
- oracle.com /security-alerts/cpuoct2021.html
- github.com /sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5
- github.com /sebastianbergmann/phpunit/pull/1956
- web.archive.org /web/20170701212357/http://phpunit.vulnbusters.com/
Show 1 more
- cisa.gov /known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841
Where the data on this page comes from
- CVE List (CVE.org): description, affected versions, references; CVE Terms of Use
- NVD: CVSS and CPE data
- CISA KEV catalog: exploitation, date added, due date
- CISA Vulnrichment (ADP): SSVC decision points
- FIRST EPSS: exploit probability and percentile
- Exploit-DB: published exploits
- Nuclei templates: detection templates
- PoC-in-GitHub: GitHub repositories that claim a proof of concept
Summary, impact and triage tags: written by our AI analysis pipeline from the sources above. Check them against the sources.
Similar CVEs
Get CVEs like this by email. Join the free digest: the CVEs we flag as major, all CVSS 8.0 or higher, in up to three emails a day (sent at 05:00, 11:00 and 15:00 UTC). Matching alerts to the products you run needs an account, and accounts are invite-only during the beta.