CVE-2017-9841 — Code Injection in phpunit/phpunit — CVE Details
Code Injection in PHPUnit
What Should I Do?
Patch Immediately
This vulnerability is confirmed under active exploitation (CISA KEV). Patch within 24-48 hours if possible.
Summary
Advisory Timeline
- First published March 26, 2022 (1661 days ago).
- Last revised October 22, 2025 — 1307 days after initial publication.
- Added to CISA's Known Exploited Vulnerabilities catalog 39 days before publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "phpunit/phpunit:^5.6.3"
composer require "phpunit/phpunit:^4.8.28"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: packagist (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| phpunit/phpunit | packagist | 5.0.10, 5.1.0, 5.1.1, 5.1.2 (+44 more) | 5.6.3 |
| phpunit/phpunit | packagist | 4.8.19, 4.8.20, 4.8.21, 4.8.22 (+5 more) | 4.8.28 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2017-9841ADVISORY
- https://github.com/sebastianbergmann/phpunit/pull/1955WEB
- https://github.com/sebastianbergmann/phpunit/pull/1956WEB
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5WEB
- https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yamlWEB
- https://github.com/sebastianbergmann/phpunitPACKAGE
- https://security.gentoo.org/glsa/201711-15WEB
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841WEB
- https://www.oracle.com/security-alerts/cpuoct2021.htmlWEB
- https://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.comWEB
- https://www.securityfocus.com/bid/101798WEB
- https://www.securitytracker.com/id/1039812WEB
Frequently Asked Questions
- What is CVE-2017-9841?
- Code Injection in PHPUnit This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2017-9841?
- CVE-2017-9841 affects phpunit/phpunit. This vulnerability is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, meaning it is being actively exploited in the wild. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2017-9841 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is straightforward and causes maximum impact. Patch immediately.
This vulnerability is in CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild.
Added to KEV catalog: February 15, 2022
Remediation deadline: August 15, 2022
Also Known As
Related CVEs
- CVE-2026-107845CRITICAL
Contao: Cross-site scripting in the comments bundle
- CVE-2026-92161CRITICAL
FriendsOfFlarum OAuth: Unauthenticated account takeover via unverified email trust in Discord OAuth provider
- CVE-2026-24765HIGH
PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies