CVE-2024-50340: Symfony/runtime Symfony Allows Changing The Environment Vulnerability
MODERATECVE-2024-50340 is a MODERATE (CVSS 7.3) symfony allows changing the environment vulnerability (CWE-20: Improper Input Validation) affecting Symfony/runtime libraries in the Packagist ecosystem. The issue involves symfony allows changing the environment through a query. Remediation is available by upgrading affected packages to version 5.4.46, 6.4.14, 7.1.7.
CVE-2024-50340 at a Glance
Security Impact
CVSS: 7.3
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:L/I:L/A:L).
How to Fix CVE-2024-50340
To remediate this vulnerability, upgrade all affected Symfony/runtime 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 symfony/runtime to 5.4.46
Upgrade symfony/runtime to 6.4.14
Upgrade symfony/runtime to 7.1.7
Upgrade symfony/symfony to 5.4.46
Upgrade symfony/symfony to 6.4.14
Upgrade symfony/symfony to 7.1.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/runtime
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-50340, inspect your project dependencies for Symfony/runtime:
inspect dependencies for symfony/runtime
Analyze the terminal output to locate any version of Symfony/runtime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.46), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Symfony/runtime, 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-50340 Affected Symfony/runtime Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/runtime
|
Packagist |
≥ 5.3.0
< 5.4.46
|
5.4.46
|
|
symfony/runtime
|
Packagist |
≥ 6.0.0
< 6.4.14
|
6.4.14
|
|
symfony/runtime
|
Packagist |
≥ 7.0.0
< 7.1.7
|
7.1.7
|
|
symfony/symfony
|
Packagist |
≥ 5.3.0
< 5.4.46
|
5.4.46
|
|
symfony/symfony
|
Packagist |
≥ 6.0.0
< 6.4.14
|
6.4.14
|
|
symfony/symfony
|
Packagist |
≥ 7.0.0
< 7.1.7
|
7.1.7
|
References
Frequently Asked Questions
What is CVE-2024-50340?
Which Symfony/runtime versions are affected?
What version fixes CVE-2024-50340?
Is symfony/runtime affected?
Is symfony/symfony affected?
What is the CVSS score of CVE-2024-50340?
What CWE is associated with CVE-2024-50340?
How can I check Packagist dependencies for CVE-2024-50340?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x8vp-gf4q-mw5j",
"modified" : "2024-11-06T23:39:51Z",
"published" : "2024-11-06T15:11:07Z",
"aliases" : [ "CVE-2024-50340" ],
"summary" : "Symfony allows changing the environment through a query",
"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 or debug mode used by the kernel when handling the request.\n\n### Resolution\n\nThe `SymfonyRuntime` now ignores the `argv` values for non-cli SAPIs PHP runtimes\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/a77b308c3f179ed7c8a8bc295f82b2d6ee3493fa) for branch 5.4.\n\n### Credits\n\nWe would like to thank Vladimir Dusheyko for reporting the issue and Wouter de Jong for providing the fix.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/runtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.3.0"
}, {
"fixed" : "5.4.46"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/runtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/runtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.3.0"
}, {
"fixed" : "5.4.46"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.4.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.1.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-x8vp-gf4q-mw5j"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-50340"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/a77b308c3f179ed7c8a8bc295f82b2d6ee3493fa"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/runtime/CVE-2024-50340.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2024-50340.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2024-50340"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-74" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-06T15:11:07Z",
"nvd_published_at" : "2024-11-06T21:15:05Z"
}
}