Actively exploited · Published Jun 27, 2017 · Assigned by mitre

CVE-2017-9841

Critical 9.8 Exploited

In plain English

A critical-severity code injection in PHPUnit from PHPUnit. Attackers are actively exploiting it in the wild (listed by CISA on February 15, 2022). The chance it is exploited in the next 30 days is estimated at 100.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)100.0%top 0.0% of all CVEs
Exploited in the wildYesCISA KEV since Feb 15, 2022
Attack tooling2Nuclei, Public PoC

CISA guidance

Apply updates per vendor instructions.

Federal agencies must remediate by Aug 15, 2022.

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12phpunit5.4.6-2DEBIAN-CVE-2017-9841
Debian:13phpunit5.4.6-2DEBIAN-CVE-2017-9841
Debian:14phpunit5.4.6-2DEBIAN-CVE-2017-9841
Packagistphpunit/phpunit4.8.28GHSA-r7c9-c69m-rph8
Packagistphpunit/phpunit5.6.3GHSA-r7c9-c69m-rph8

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References