CVE-2024-52301 in laravel framework

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

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.

Affected software: laravel framework, debian linux

Scores

What LogPulse has for it

How to mitigate it

Update Laravel to a release that ignores argv for the environment

Patch or upgrade. With register_argc_argv on, Laravel reads the query string as command line arguments, so a remote user can switch the application environment with --env. The fixed releases ignore argv outside the command line.

Applies to: Laravel framework before 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23 and 11.31.0 on PHP with register_argc_argv on.

  1. Check laravel/framework in composer.lock of each application.
  2. Run composer update laravel/framework to at least 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23 or 11.31.0 for your major version, then redeploy.
  3. Also set register_argc_argv = Off in the php.ini used by PHP-FPM or the web server module and restart PHP.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse