ZeroHour

CVE-2024-52301

mass

Argument Injection in Laravel Lets Attackers Switch App Environment via Query String

CVSS 4.0
8.7 high
EPSS
45%p99
Published
()
Modified
AI analysis

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.

Affected
Laravel Framework6.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)
Estimated exposure
massplausibly 100,000+ exposed Laravel applications (framework runs on hundreds of thousands to millions of sites, and the enabling register_argc_argv=On PHP… — Laravel is one of the most widely deployed PHP frameworks (hundreds of thousands to millions of production apps and tens of millions of monthly Packagist downloads), and the triggering PHP default register_argc_argv=On is common on shared…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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.

Vendors
laraveldebian
Products
framework, debian linux
Weakness
CWE-88
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.