PT-2017-4155 · Phpunity +1 · Phpunit +1

Published

2017-06-27

·

Updated

2025-09-29

·

CVE-2017-9841

CVSS v2.0
10
VectorAV:N/AC:L/Au:N/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions PHPUnit versions 4.8.19 through 4.8.27 PHPUnit versions 5.x before 5.6.3
Description The issue is related to the Util/PHP/eval-stdin.php component in PHPUnit, which allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring. This can be exploited by accessing the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI on a site with an exposed /vendor folder. The vulnerability is due to incorrect code generation management, which can be exploited using a specially crafted HTTP POST request.
Recommendations For versions 4.8.19 through 4.8.27, update to version 4.8.28 or later. For versions 5.x before 5.6.3, update to version 5.6.3 or later. As a temporary workaround, consider restricting access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI to minimize the risk of exploitation.

Exploit

Fix

RCE

Code Injection

Weakness Enumeration

Related Identifiers

BDU:2021-04398
CVE-2017-9841
GHSA-R7C9-C69M-RPH8
MGASA-2017-0429
USN-7171-1

Affected Products

Phpunit
Ubuntu