Advisory

GHSA-r7c9-c69m-rph8

Also known as: CVE-2017-9841

Summary

Code Injection in PHPUnit

Details

Util/PHP/eval-stdin.php in PHPUnit starting with 4.8.19 and before 4.8.28, as well as 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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2022-03-26 00:19 UTC
Modified
2025-10-22 19:24 UTC

Affected packages and fixes

phpunit/phpunit

Packagist · All systems

Affected

  • introduced 4.8.19, fixed 4.8.28 (ecosystem)

Fixed versions

4.8.28

Fix

The export has no generic command for this ecosystem.

phpunit/phpunit

Packagist · All systems

Affected

  • introduced 5.0.10, fixed 5.6.3 (ecosystem)

Fixed versions

5.6.3

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences