CVE-2024-52301: Laravel/framework Laravel Environment Manipulation Vulnerability
HIGHCVE-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
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).
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.
Upgrade laravel/framework to 6.20.45
Upgrade laravel/framework to 7.30.7
Upgrade laravel/framework to 8.83.28
Upgrade laravel/framework to 9.52.17
Upgrade laravel/framework to 10.48.23
Upgrade laravel/framework to 11.31.0
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
CVE-2024-52301 Affected Laravel/framework Versions
6 component(s)| 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?
Which Laravel/framework versions are affected?
What version fixes CVE-2024-52301?
Is laravel/framework affected?
What is the CVSS score of CVE-2024-52301?
What CWE is associated with CVE-2024-52301?
How can I check Packagist dependencies for CVE-2024-52301?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}