Laravel allows environment manipulation via query string
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Laravel framework allows environment manipulation via crafted query strings when PHP's register_argc_argv is enabled, bypassing intended configuration.
Vulnerability
Overview
CVE-2024-52301 affects the Laravel web application framework. When the PHP directive register_argc_argv is set to on, an attacker can craft a special query string that, when requested, alters the environment used by the framework to handle the request. This allows the attacker to control the application's environment variable, which can lead to unintended configuration changes. [1][2]
Exploitation
Details
The vulnerability is exploitable by sending a specially crafted URL to the application. No authentication is required, and the attack can be performed over the network. The prerequisite is that the server must have register_argc_argv enabled in PHP configuration. By manipulating the query string, the attacker influences how Laravel detects the current environment (e.g., local, production), potentially enabling debug modes or loading different configuration sets. [1][2]
Impact
Successful exploitation permits an attacker to force the application to run in an arbitrary environment. This could expose sensitive information (e.g., in debug output), bypass security restrictions, or cause the application to use development-only configuration that may include weaker security settings. The impact depends on how the application uses environment-specific behavior. [2]
Mitigation
The vulnerability has been patched in Laravel versions 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, and 11.31.0. The fix involves ignoring argv values for environment detection on non-CLI SAPIs, preventing the query string manipulation from affecting environment determination. Users are strongly advised to upgrade to the appropriate patched version. Additionally, disabling register_argc_argv on production servers can serve as a mitigation until upgrades are applied. [1][2]
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
laravel/frameworkPackagist | < 6.20.45 | 6.20.45 |
laravel/frameworkPackagist | >= 7.0.0, < 7.30.7 | 7.30.7 |
laravel/frameworkPackagist | >= 8.0.0, < 8.83.28 | 8.83.28 |
laravel/frameworkPackagist | >= 9.0.0, < 9.52.17 | 9.52.17 |
laravel/frameworkPackagist | >= 10.0.0, < 10.48.23 | 10.48.23 |
laravel/frameworkPackagist | >= 11.0.0, < 11.31.0 | 11.31.0 |
Affected products
3- osv-coords2 versions
< 6.20.45+ 1 more
- (no CPE)range: < 6.20.45
- (no CPE)range: < 6.20.45
- laravel/frameworkv5Range: < 6.20.45
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-gv7v-rgg6-548hghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-52301ghsaADVISORY
- github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2024-52301.yamlghsaWEB
- github.com/laravel/framework/security/advisories/GHSA-gv7v-rgg6-548hghsax_refsource_CONFIRMWEB
- lists.debian.org/debian-lts-announce/2024/12/msg00019.htmlghsaWEB
News mentions
0No linked articles in our index yet.