CVE-2017-9841 kev in the critical feed json
Code Injection in PHPUnit
published 2017-06-27 9 y ago modified 2026-06-17 4 mo ago also GHSA-r7c9-c69m-rph8 , EUVD-2022-1528
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Exploited
- added 2022-02-15
- epss
- 100.0%
- EPSS 100.0% chance of exploitation in 30 days, percentile 99.9%
- public exploits
- 1
- Exploit-DB, plus a Nuclei check
Summary
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.
Patch / fix
cisa required action Apply updates per vendor instructions.
- packagist phpunit/phpunit 4.8.28, 5.6.3
- phpunit_project phpunit 5.6.3
- phpunit Debian 14, Debian 13, Debian 12 5.4.6-2
debian advisories DEBIAN-CVE-2017-9841
- phpunit Ubuntu Pro 16.04 LTS 5.1.3-1+ubuntu3+esm1
ubuntu advisories UBUNTU-CVE-2017-9841
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- mediawiki Arch Linux 1.28.3-1
arch linux advisories AVG-491
- github.com/sebastianbergmann/phpunit@284a69f commit
- github.com/sebastianbergmann/phpunit@3aaddb1 commit
- github.com/sebastianbergmann/phpunit#1956 pull request
- github.com/sebastianbergmann/phpunit#1955 pull request
- oracle.com/security-alerts/cpuoct2021.html advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-9841 updated cvss 8.8
php-phpunit-PHPUnit: allows attackers to execute arbitrary PHP code via HTTP POST data
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- Published
- First public exploit (EDB-50702)
- Added to CISA KEV
- CISA patch deadline
- CISA SSVC: exploitation active
Known exploited
- Added
- 4 y ago
- Patch by
- 2022-08-15 (4 y ago)
- Ransomware
- Not known
- Required action
- Apply updates per vendor instructions.
- Vendor, product
- PHPUnit, PHPUnit
- CISA name
- PHPUnit Command Injection Vulnerability
CISA SSVC
- Exploitation
- Active, exploited in the wild
- Automatable
- yes
- Technical impact
- total
- Assessed
- 21 mo ago
Exploit prediction
100.00% chance of exploitation in the next 30 days, higher than 99.9% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- EDB-50702 PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated) webapps, 2022-02-02
- Nuclei template PHPUnit - Remote Code Execution nuclei detection template
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | phpunit/phpunit | >=4.8.19, <4.8.28 >=5.0.10, <5.6.3 |
4.8.28 5.6.3 |
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5
web, patch, third-party-advisory
-
github.com
/sebastianbergmann/phpunit/pull/1956
web, patch, third-party-advisory
-
oracle.com
/security-alerts/cpuoct2021.html
web, patch, third-party-advisory
-
github.com
/sebastianbergmann/phpunit/pull/1955
web
-
github.com
/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412
web
-
security.gentoo.org
/glsa/201711-15
vendor-advisory, web, third-party-advisory
-
securityfocus.com
/bid/101798
vdb-entry, web, broken-link
-
securitytracker.com
/id/1039812
vdb-entry, web, broken-link
-
web.archive.org
/web/20170701212357/http://phpunit.vulnbusters.com/
third-party-advisory
-
cisa.gov
/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841
government-resource, web, us-government-resource
-
nvd.nist.gov
/vuln/detail/CVE-2017-9841
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml
web
-
github.com
/sebastianbergmann/phpunit
package
-
web.archive.org
/web/20170701212357/http://phpunit.vulnbusters.com
web
Sources
- CVE List CVE-2017-9841
- GitHub Advisory GHSA-r7c9-c69m-rph8
- NVD CVE-2017-9841
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.