CVE-2024-52301
massArgument Injection in Laravel Lets Attackers Switch App Environment via Query String
CVE-2024-52301 is an argument-injection flaw (CWE-88) in the Laravel framework's environment detection: when PHP's register_argc_argv directive is enabled, the framework treats values from the HTTP query string as command-line (argv) arguments on non-CLI requests. An unauthenticated attacker can therefore call any URL with a crafted query string (e.g., an --env-style argument) to change which application environment Laravel loads while handling that request. Because the selected environment controls which .env-style configuration is used (for example per-environment settings, debug flags, or service credentials), the attacker gains influence over application behavior and configuration, reflected in the high integrity impact (VI:H) with no confidentiality or availability impact in the CVSS 4.0 score of 8.7 (High). Any Laravel application running versions before the fixes below on a non-CLI PHP SAPI (such as FPM/CGI) with register_argc_argv set to On is affected, including Laravel framework packages shipped by Debian. No public proof-of-concept or confirmed in-the-wild exploitation is known, though the 44.8% EPSS score (99th percentile) indicates an elevated assessed likelihood of exploitation in the next 30 days.
What to do: Upgrade Laravel to 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, or 11.31.0 (or later on your branch, and to the fixed Debian-packaged version if applicable). As a mitigation or stopgap, set register_argc_argv=Off in php.ini for web SAPIs. Audit your application for multiple environment files (e.g., per-environment .env files) whose selection an attacker could manipulate, since the practical impact depends on how environment-specific configuration differs.
| Laravel Framework | 6.x before 6.20.45; 7.x before 7.30.7; 8.x before 8.83.28; 9.x before 9.52.17; 10.x before 10.48.23; 11.x before 11.31.0 (when register_argc_argv is On) |
| Debian Linux (Laravel framework as packaged) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Laravel is a web application framework. When the register_argc_argv php directive is set to on , and users call any URL with a special crafted query string, they are able to change the environment used by the framework when handling the request. The vulnerability fixed in 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, and 11.31.0. The framework now ignores argv values for environment detection on non-cli SAPIs.
In the news0 stories
No ingested article mentions this CVE yet.