← back
CVE-2017-9841

CVE-2017-9841

CVSS 9.8 CRITICALEPSS 100.0%● KEVCWE-94
In short

PHPUnit's eval-stdin.php script allows attackers to execute arbitrary PHP code by sending specially crafted HTTP POST requests. This is critical because it gives complete control over the server to anyone who can access the exposed file.

Technical detail

A remote code execution vulnerability in PHPUnit versions before 4.8.28 and 5.x before 5.6.3 exists in the eval-stdin.php utility script, which unsafely evaluates PHP code from POST data. An unauthenticated attacker can exploit this if the /vendor directory is publicly accessible, achieving arbitrary code execution on the server with the privileges of the web process.

Summary generated and translated by AI from the 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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected products
n/a · n/a
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →