Stackurity Start free trial

CVEs / CVE-2017-9841

CVE-2017-9841: PHPUnit Command Injection Vulnerability

Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.

Check your servers with Stackurity Already using Stackurity? Search for CVE-2017-9841

Summary

PHPUnit 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.

CISA, Known Exploited Vulnerabilities catalog

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.

The CVE record, via NVD · published 27 Jun 2017 · NVD status: Analyzed

Affected and fixed versions

As stated by the CVE record (from the CNA)
ProductAffectedFixed in
n/a n/an/a—
As stated by OSV
ProductAffectedFixed in
phpunit/phpunit (Packagist)from 4.8.19, before 4.8.284.8.28
phpunit/phpunit (Packagist)from 5.0.10, before 5.6.35.6.3

Package versions from GHSA-r7c9-c69m-rph8.

Exploitation

In CISA KEV since15 Feb 2022
Due date for US federal agencies15 Aug 2022
Used in ransomware campaignsUnknown
Required actionApply updates per vendor instructions.

Severity

CVSS 3.19.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Scored by NVD
WeaknessCWE-94

References

Sources

Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.

This product uses data from the NVD API but is not endorsed or certified by the NVD.