CVE-2024-50340 Ability to change environment from query in symfony/runtime

High 7.3 Published Updated

Attackers can alter application environment or debug mode via crafted query strings when specific PHP directives are enabled, potentially exposing sensitive configurations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-50340?

CVE-2024-50340 is a high-severity vulnerability in symfony, published on 6 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

symfony/runtime is a module for the Symphony PHP framework which enables decoupling PHP applications from global state. When the `register_argv_argc` 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. As of versions 5.4.46, 6.4.14, and 7.1.7 the `SymfonyRuntime` now ignores the `argv` values for non-SAPI PHP runtimes. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-74

Which versions are affected by CVE-2024-50340?

12 open source packages ship an affected version, including symfony/runtime and symfony/symfony.

PackageAffectedFixed in
symfony/runtime PackagistFrom 5.3.05.4.46
symfony/runtime PackagistFrom 5.3.05.4.46
symfony/runtime PackagistFrom 6.0.06.4.14
symfony/runtime PackagistFrom 6.0.06.4.14
symfony/runtime PackagistFrom 7.0.07.1.7
symfony/runtime PackagistFrom 7.0.07.1.7
6 more packages
symfony/symfony PackagistFrom 5.3.05.4.46
symfony/symfony PackagistFrom 5.3.05.4.46
symfony/symfony PackagistFrom 6.0.06.4.14
symfony/symfony PackagistFrom 6.0.06.4.14
symfony/symfony PackagistFrom 7.0.07.1.7
symfony/symfony PackagistFrom 7.0.07.1.7

How do I fix CVE-2024-50340?

Upgrade symfony/runtime to a fixed version for your release line: 5.4.46, 6.4.14 or 7.1.7.

Is CVE-2024-50340 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-50340 exists.

Public exploit code: 1 Nuclei template and 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2024-50340, GHSA-x8vp-gf4q-mw5j, UBUNTU-CVE-2024-50340.

Is CVE-2024-50340 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free