PortGate

Advisories · PHP & Laravel

CVE-2024-52301 High CVSS 7.7

Laravel environment manipulation from the query string

Disclosed 2024 · Last reviewed 2 Dec 2026

With register_argc_argv enabled, a query string could change the environment Laravel selected for the request.

What happened

The framework read argv for environment detection on web SAPIs, and PHP filled argv from the query string when that directive was on.

Affected and patched versions

Affected
Laravel before 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, and 11.31.0 when register_argc_argv is On.
Patched
Those six releases. Stay on the major you already run.

How to check your server

Check

composer show laravel/framework

How to fix and harden

  1. Run composer show laravel/framework in the application directory.
  2. Upgrade within your major version. A 10.x app should not jump to 11 just to clear this bug.
  3. Set register_argc_argv to Off for PHP-FPM.

Fix

composer show laravel/framework

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON