This file is highly dangerous if left accessible on a live production server. It does not require any authentication to run, meaning anyone who can access the file over the internet can force your server to execute arbitrary PHP code. The Vulnerability: CVE-2017-9841
This file contains a very small but powerful script:
If you’ve recently come across a web server log or a directory listing containing the string index of vendor phpunit phpunit src util php evalstdinphp work , you’re likely looking at a combination of a directory index exposure and a reference to a specific, dangerous file within the PHPUnit testing framework. This file is highly dangerous if left accessible
The eval-stdin.php file uses an insecure eval() function call that executes input received via php://stdin (intended for command-line use) but can be reached via HTTP POST requests in web-accessible environments.
Indicates a directory listing is visible to the public. The eval-stdin
The .htaccess or Nginx configuration files fail to block access to the vendor directory. How Attackers Exploit It
This exposure is officially classified as , a "Code Injection" vulnerability with a critical CVSS v3 base score of 9.8 . How Attackers Exploit It This exposure is officially
// Ensure code starts with opening tag for include/eval consistency if (strpos($stdin, '<?php') !== 0 && strpos($stdin, '<?') !== 0) $stdin = "<?php\n" . $stdin;
PHPUnit Remote Code Execution (CVE-2017-9841) ... PHPUnit is a programmer-oriented testing framework for PHP. Util/PHP/eval-stdin.