When deploying to your live server, always install dependencies using the --no-dev flag to prevent development tools from being uploaded: composer install --no-dev --optimize-autoloader Use code with caution. 3. Change Your Web Root (The Best Long-Term Fix)
$ echo "<?php echo 'Hello, World!';" | php vendor/phpunit/phpunit/src/util/php/evalStdin.php index of vendor phpunit phpunit src util php evalstdinphp
If you find this on a public site, report it to the owner immediately. When deploying to your live server, always install
PHPUnit should never exist on a live production server. Clean your environment by running Composer with the appropriate flag to strip out all development packages: composer install --no-dev --optimize-autoloader Use code with caution. 2. Block Access via .htaccess (Apache) PHPUnit should never exist on a live production server
Your web server (Apache, Nginx) should point its document root to a public directory (like /public or /web ) that only contains your main entry file ( index.php ) and assets (CSS, JS). The vendor directory, configuration files, and source code should live one level above the web root so they cannot be accessed via a URL. 4. Disable Directory Listing
The problem arises when PHPUnit is installed via Composer and the entire vendor/ directory ends up inside the web server’s document root. When that happens, eval‑stdin.php becomes a public web endpoint that anyone on the Internet can reach.
: Bots are scanning your site to see if the /vendor/ folder is publicly accessible and if you are running an outdated, vulnerable version of PHPUnit.