CVE-2017-9841
CRITICAL 9.8CVSS 3.1known exploitedCode Injection in PHPUnit
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
- 27 Jun 2017
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Analyzed
- Weakness
- CWE-94
- Also known as
- GHSA-r7c9-c69m-rph8
- Sources
- NVDJSONCISA KEVJSONOSV GHSA-r7c9-c69m-rph8JSON
In CISA's Known Exploited Vulnerabilities catalog since 15 Feb 2022; US federal agencies must fix it by 15 Aug 2022.
Apply updates per vendor instructions.
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | phpunit_project | phpunitcpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:*:*:* |
<= 4.8.27 | |
| NVD | phpunit_project | phpunitcpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:*:*:* |
>= 5.0.0, < 5.6.3 | 5.6.3 |
| NVD | oracle | communications_diameter_signaling_routercpe:2.3:a:oracle:communications_diameter_signaling_router:*:*:*:*:*:*:*:* |
>= 8.0.0, <= 8.5.0 | |
| OSV | Packagist | phpunit/phpunit | >= 4.8.19, < 4.8.28 | 4.8.28 |
| OSV | Packagist | phpunit/phpunit | >= 5.0.10, < 5.6.3 | 5.6.3 |
References
- http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/ · Third Party Advisory, WEB
- http://www.securityfocus.com/bid/101798 · Broken Link, WEB
- http://www.securitytracker.com/id/1039812 · Broken Link, WEB
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5 · Patch, Third Party Advisory, WEB
- https://github.com/sebastianbergmann/phpunit/pull/1956 · Patch, Third Party Advisory, WEB
- https://security.gentoo.org/glsa/201711-15 · Third Party Advisory, WEB
- https://www.oracle.com/security-alerts/cpuoct2021.html · Patch, Third Party Advisory, WEB
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841 · US Government Resource, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2017-9841 · ADVISORY
- https://github.com/sebastianbergmann/phpunit/pull/1955 · WEB
- https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412 · WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml · WEB
- https://github.com/sebastianbergmann/phpunit · PACKAGE
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 27 Jun 2017)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 26 Mar 2022)
- 25 Nov 2026 20:10 UTC · CISA KEV: first stored (published 15 Feb 2022)
- 15 Feb 2022 00:00 UTC · Listed as known exploited