← PHP / Laravel · Contents

PHP-048 / Intermediate

Exposing vendor test scripts (eval-stdin.php)

A06:2021 Vulnerable and Outdated Components · CWE-94 Code Injection

Why is this a problem?

Remote code execution is possible if PHPUnit 4.8.x–5.x eval-stdin.php is callable over the web.

How to fix it

bash
composer install --no-dev   # Exclude test tools
# Expose only public as the web root and block access to vendor

Further reading