CVE-2024-52301: Laravel/framework Laravel Environment Manipulation Vulnerability

HIGH
Advisory Identifier: GHSA-gv7v-rgg6-548h
CVSS 0.0
CWE-88
Published
Advisory Summary

CVE-2024-52301 is a HIGH (CVSS 0.0) laravel environment manipulation vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Laravel/framework libraries in the Packagist ecosystem. The issue involves laravel environment manipulation via query string. Remediation is available by upgrading affected packages to version 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, 11.31.0.

CVE-2024-52301 at a Glance

CVE Identifier CVE-2024-52301
GHSA Identifier GHSA-gv7v-rgg6-548h
Severity HIGH
CVSS v3.1 Base Score 0.0
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Laravel/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 0.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-52301

To remediate this vulnerability, upgrade all affected Laravel/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

laravel/framework fixed: 6.20.45
Upgrade laravel/framework to 6.20.45
laravel/framework fixed: 7.30.7
Upgrade laravel/framework to 7.30.7
laravel/framework fixed: 8.83.28
Upgrade laravel/framework to 8.83.28
laravel/framework fixed: 9.52.17
Upgrade laravel/framework to 9.52.17
laravel/framework fixed: 10.48.23
Upgrade laravel/framework to 10.48.23
laravel/framework fixed: 11.31.0
Upgrade laravel/framework to 11.31.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for laravel/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-52301, inspect your project dependencies for Laravel/framework:

inspect dependencies for laravel/framework

Analyze the terminal output to locate any version of Laravel/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.20.45), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Laravel/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Description 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. ## Resolution The framework now ignores argv values for environment detection on non-cli SAPIs.

CVE-2024-52301 Affected Laravel/framework Versions

6 component(s)
Fixed Versions:
6.20.457.30.78.83.289.52.1710.48.2311.31.0
Product / Package Ecosystem Affected Versions Fixed Version
laravel/framework
Packagist
< 6.20.45
6.20.45
laravel/framework
Packagist
≥ 7.0.0
< 7.30.7
7.30.7
laravel/framework
Packagist
≥ 8.0.0
< 8.83.28
8.83.28
laravel/framework
Packagist
≥ 9.0.0
< 9.52.17
9.52.17
laravel/framework
Packagist
≥ 10.0.0
< 10.48.23
10.48.23
laravel/framework
Packagist
≥ 11.0.0
< 11.31.0
11.31.0

References

Frequently Asked Questions

What is CVE-2024-52301?
CVE-2024-52301 is a security vulnerability in Laravel/framework involving Laravel environment manipulation via query string under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Laravel/framework versions are affected?
Affected versions include releases prior to 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, 11.31.0 across affected packages: laravel/framework.
What version fixes CVE-2024-52301?
Upgrading to 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, 11.31.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/framework affected?
Yes, laravel/framework is affected in releases prior to 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, 11.31.0. Upgrade your dependency to 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23, 11.31.0 or later.
What is the CVSS score of CVE-2024-52301?
CVE-2024-52301 has a CVSS v3.1 base score of 0.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N.
What CWE is associated with CVE-2024-52301?
CVE-2024-52301 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.).
How can I check Packagist dependencies for CVE-2024-52301?
Run the dependency tree command: 'inspect dependencies for laravel/framework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gv7v-rgg6-548h",
  "modified" : "2024-12-21T18:30:49Z",
  "published" : "2024-11-12T22:08:42Z",
  "aliases" : [ "CVE-2024-52301" ],
  "summary" : "Laravel environment manipulation via query string",
  "details" : "## Description\n\nWhen 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.\n\n## Resolution\n\nThe framework now ignores argv values for environment detection on non-cli SAPIs.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.20.45"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.30.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.83.28"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.52.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.48.23"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.31.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/security/advisories/GHSA-gv7v-rgg6-548h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52301"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2024-52301.yaml"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-gv7v-rgg6-548h"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/framework"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/12/msg00019.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-88" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-12T22:08:42Z",
    "nvd_published_at" : "2024-11-12T20:15:14Z"
  }
}