Ability to change environment from query in symfony/runtime
Fix:upgrade runtime and symfony Versions ↓
symfony · symfony
The Symfony Runtime component (symfony/runtime, part of the Symfony PHP framework) incorrectly trusts values from the command-line argument array when the register_argv_argc PHP directive is enabled, so a crafted query string can reach it. An unauthenticated remote attacker who can reach the application over the network can send a single specially crafted request to any URL, with no user interaction needed, to alter the environment or debug mode the kernel uses to handle that request.
Official description · CVE.org
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.
- Exploited
- Yes, in VulnCheck KEV
- Reports
- 0
- Tactics
- 0/15
Exploitation timelineDated milestones for a CVE: when it was disclosed, when exploit code became public, when exploitation was confirmed, and when threat reports named it.
First seen exploited 22 months after disclosure. Public exploit code (PoC-in-GitHub) was available the same day.
- First seen exploitedVulnCheck KEV evidence+22 mo
Patch historyEarlier and later CVEs in the same code, in date order. It shows when a fix was bypassed or incomplete and which version finally fixed it.
2 related vulnerabilities in the same code over 20 months. The latest fix listed for symfony/symfony is 7.3.7.
Linked vulnerabilitiesLinked by evidence that a fix failed or the same code was patched again. Oldest first.
- This CVECVE-2024-50340Ability to change environment from query in symfony/runtime6 Nov 2024
relatedHigh
Why these are linked: Link confidenceHow strong the evidence is that two CVEs are related. High: stated in the CVE text or linked in an advisory, or the same code was patched one release apart. Medium: the same code, or a version step plus a similar description. Low: similar description only.
- Fixed one release later5.4.46 → 5.4.52 (symfony/runtime)
- Fixed one release later6.4.14 → 6.4.40 (symfony/runtime)
- Same code patched: SymfonyRuntime.php (machine-matched)Functions: __construct, registercommit a77b308commit 3228c38
Fixes in symfony/symfonyPackagist package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.
- 6.3.8CVE-2023-4673510 Nov 2023
- 7.1.3CVE-2024-503416 Nov 2024
- 7.1.4CVE-2024-503436 Nov 2024
- 7.1.7CVE-2024-503406 Nov 2024
- 7.1.7CVE-2024-517366 Nov 2024
- 7.1.8CVE-2024-503426 Nov 2024
- 7.3.7CVE-2025-6450012 Nov 2025Latest listed
Affected versions and fixes
as published in the CVE recordsymfony symfony
Affected: < 5.4.46 · >= 6.0.0, < 6.4.14 · >= 7.0.0, < 7.1.7
Am I affected? What do I upgrade to?
From GitHub Security Advisories and OSV2 packages in 1 ecosystem. No single main package: each of these ships the affected code.
- Packagistsymfony/runtimeAffected: 7.0.0 up to 7.1.7; 6.0.0 up to 6.4.14; 5.3.0 up to 5.4.46Upgrade to 7.1.7 or later (older lines: 6.4.14, 5.4.46)
- Packagistsymfony/symfonyAffected: 7.0.0 up to 7.1.7; 6.0.0 up to 6.4.14; 5.3.0 up to 5.4.46Upgrade to 7.1.7 or later (older lines: 6.4.14, 5.4.46)