Laravel Framework Environment Manipulation Vulnerability - GHSA-gv7v-rgg6-548h

laravel/framework Updated 02 Oct 2025

Summary

12/11/2024
Yes i
High
0.0

CVE-2024-52301: Laravel environment manipulation via query string. Affects laravel/framework across 6 version ranges.

< 6.20.45 >= 7.0.0, < 7.30.7 >= 8.0.0, < 8.83.28 >= 9.0.0, < 9.52.17 >= 10.0.0, < 10.48.23 >= 11.0.0, < 11.31.0

Fixed in 6 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2024-52301 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Laravel is a popular open-source PHP framework designed for building web applications with an elegant syntax. It provides a robust set of tools and features, including routing, sessions, caching, and authentication, making it a preferred choice for developers. However, the framework is susceptible to a specific vulnerability that allows environment manipulation through crafted query strings when certain PHP settings are enabled.

Vulnerability Detail

The vulnerability arises when the 'register_argc_argv' PHP directive is set to 'on'. In this scenario, attackers can manipulate the environment used by the Laravel framework by crafting specific query strings in the URL. This could lead to unauthorized access or unintended behavior in the application, as the framework may process requests with altered environment settings. The issue is particularly concerning for applications that rely on environment variables for configuration, as it can compromise the integrity and security of the application.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 6.20.45 6.20.45
    composer require laravel/framework:6.20.45
  • >= 7.0.0, < 7.30.7 7.30.7
    composer require laravel/framework:7.30.7
  • >= 8.0.0, < 8.83.28 8.83.28
    composer require laravel/framework:8.83.28
  • >= 9.0.0, < 9.52.17 9.52.17
    composer require laravel/framework:9.52.17
  • >= 10.0.0, < 10.48.23 10.48.23
    composer require laravel/framework:10.48.23
  • >= 11.0.0, < 11.31.0 11.31.0
    composer require laravel/framework:11.31.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, you can disable the 'register_argc_argv' directive in your PHP configuration. This can be done by modifying the php.ini file:

register_argc_argv = Off

Alternatively, ensure that your application does not rely on the argv values for environment detection in non-CLI contexts.

Conclusion

The Laravel framework has a vulnerability that allows environment manipulation through crafted query strings when the 'register_argc_argv' directive is enabled. It is crucial to update to the latest patched versions to mitigate this risk. Additionally, disabling the directive can serve as a temporary workaround while you plan for an update.

See every vulnerability recorded for laravel/framework →

Share this vulnerability

FAQ

The 'register_argc_argv' directive in PHP allows the script to access command-line arguments. When enabled, it can lead to vulnerabilities if not handled properly.

If exploited, this vulnerability can allow attackers to manipulate the environment settings of your Laravel application, potentially leading to unauthorized access or application misbehavior.

The vulnerability affects Laravel versions prior to the following patched versions: 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, and 11.31.0.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can use the Vulert playground at Vulert Scanner to analyze your composer.lock file without any signup.

If immediate updates are not feasible, consider disabling the 'register_argc_argv' directive in your PHP configuration as a temporary workaround until you can apply the necessary updates.

Related vulnerabilities

Recent vulnerabilities recorded for laravel/framework.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 6.20.45 6.20.45
    composer require laravel/framework:6.20.45
  • >= 7.0.0, < 7.30.7 7.30.7
    composer require laravel/framework:7.30.7
  • >= 8.0.0, < 8.83.28 8.83.28
    composer require laravel/framework:8.83.28
  • >= 9.0.0, < 9.52.17 9.52.17
    composer require laravel/framework:9.52.17
  • >= 10.0.0, < 10.48.23 10.48.23
    composer require laravel/framework:10.48.23
  • >= 11.0.0, < 11.31.0 11.31.0
    composer require laravel/framework:11.31.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback