VYPR
High severityNVD Advisory· Published Nov 12, 2024· Updated Dec 21, 2024

Laravel allows environment manipulation via query string

CVE-2024-52301

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.

PackageAffected versionsPatched versions
laravel/frameworkPackagist
< 6.20.456.20.45
laravel/frameworkPackagist
>= 7.0.0, < 7.30.77.30.7
laravel/frameworkPackagist
>= 8.0.0, < 8.83.288.83.28
laravel/frameworkPackagist
>= 9.0.0, < 9.52.179.52.17
laravel/frameworkPackagist
>= 10.0.0, < 10.48.2310.48.23
laravel/frameworkPackagist
>= 11.0.0, < 11.31.011.31.0

Affected products

3

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.