CVE-2026-47767: Symfony: SymfonyRuntime CVE-2024-50340 Patch Bypass: Web Requests Can Still Set APP_ENV/APP_DEBUG via parse_str/SAPI Argv Mismatch

Published Jun 9, 2026
·
Updated

Description

CVE-2024-50340 (GHSA-x8vp-gf4q-mw5j) addressed an issue where, with registerargcargv=On, a crafted query string let an unauthenticated GET change the kernel environment and debug flag by feeding --env/--no-debug through $SERVER['argv']. The fix shipped in symfony/runtime 5.4.46 / 6.4.14 / 7.1.7 gated the argv read on empty($GET) as a proxy for "is this a CLI invocation".

That proxy is unsafe: parsestr() (which builds $GET) and the web SAPI (which builds $SERVER['argv'] from the raw query when registerargcargv=On) do not agree on every input, so an attacker can craft a query that leaves $GET empty while $SERVER['argv'] carries the attacker's flags. SymfonyRuntime::getInput() then parses them, restoring the exact primitive CVE-2024-50340 was meant to prevent.

Preconditions and impact match the original CVE: web SAPI, registerargcargv=On, app booted through symfony/runtime; from an unauthenticated GET an attacker can flip APPENV and toggle APPDEBUG.

Resolution

SymfonyRuntime now gates the argv read on isset($SERVER['QUERYSTRING']) rather than on empty($GET). QUERYSTRING is the same input the SAPI uses to build argv, so the security check and the thing it protects no longer parse different sources. Worker SAPIs (FrankenPHP / RoadRunner / Swoole) keep working because the runtime constructor runs once at boot when QUERYSTRING is unset.

The patch for this issue is available here for branch 5.4.

Credits

SymfonyRuntime would like to thank 0xEr3n for reporting the issue and Nicolas Grekas for providing the fix.

Other sources

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 5.4.46 until 5.4.52, 6.4.40, 7.4.12, and 8.0.12, the CVE-2024-50340 fix gated runtime argv parsing on empty($GET), but parsestr() and the web SAPI can disagree, allowing a crafted query string to leave $GET empty while $SERVER['argv'] still carries attacker-controlled --env or --no-debug flags that change APPENV or APPDEBUG. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.

MITRE

Affected Software

12 affected componentsFixes available
composer/symfony/symfony>=8.0.0<8.0.12
8.0.12
composer/symfony/symfony>=7.1.7<7.4.12
7.4.12
composer/symfony/symfony>=6.4.14<6.4.40
6.4.40
composer/symfony/symfony>=5.4.46<5.4.52
5.4.52
composer/symfony/runtime>=8.0.0<8.0.12
8.0.12
composer/symfony/runtime>=7.1.7<7.4.12
7.4.12
composer/symfony/runtime>=6.4.14<6.4.40
6.4.40
composer/symfony/runtime>=5.4.46<5.4.52
5.4.52
SensioLabs Symfony>=5.4.46<5.4.52
SensioLabs Symfony>=6.4.14<6.4.40
SensioLabs Symfony>=7.1.7<7.4.12
SensioLabs Symfony>=8.0.0<8.0.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 8.0.12
  2. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 7.4.12
  3. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.40
  4. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 5.4.52
  5. Upgrade

    Upgrade composer/symfony/runtime to a version that resolves this vulnerability.

    Fixed in 8.0.12
  6. Upgrade

    Upgrade composer/symfony/runtime to a version that resolves this vulnerability.

    Fixed in 7.4.12
  7. Upgrade

    Upgrade composer/symfony/runtime to a version that resolves this vulnerability.

    Fixed in 6.4.40
  8. Upgrade

    Upgrade composer/symfony/runtime to a version that resolves this vulnerability.

    Fixed in 5.4.52
  9. Upgrade

    Upgrade symfony/runtime to a version that resolves this vulnerability.

    Fixed in 5.4.52
  10. Upgrade

    Upgrade symfony/runtime to a version that resolves this vulnerability.

    Fixed in 6.4.40
  11. Upgrade

    Upgrade symfony/runtime to a version that resolves this vulnerability.

    Fixed in 7.4.12
  12. Upgrade

    Upgrade symfony/runtime to a version that resolves this vulnerability.

    Fixed in 8.0.12
  13. Upgrade

    Upgrade symfony/runtime to a version that resolves this vulnerability.

    Patch CVE-2024-50340 (GHSA-x8vp-gf4q-mw5j)
  14. Configuration

    Update SymfonyRuntime so the runtime only reads/parses $_SERVER['argv'] when isset($_SERVER['QUERY_STRING']), not when empty($_GET), to prevent parse_str() vs web SAPI argv mismatch that can leave $_GET empty while $_SERVER['argv'] contains attacker-controlled --env/--no-debug affecting APP_ENV/APP_DEBUG.

    SymfonyRuntime argv gating condition for reading $_SERVER['argv'] = gate on isset($_SERVER['QUERY_STRING']) (instead of empty($_GET))
  15. Compensating control

    If upgrading cannot be completed immediately, mitigate by ensuring QUERY_STRING-related handling cannot cause argv injection effects (e.g., prevent unauthenticated access to routes that trigger SymfonyRuntime initialization with register_argc_argv=On), since the described mismatch requires web SAPI with register_argc_argv=On and symfony/runtime boot via symfony/runtime.

Event History

Jun 9, 2026
Advisory Published
via GitHub·09:58 PM
Data Sourced
via GitHub·09:58 PM
DescriptionWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·06:38 PM
Data Sourced
via MITRE·06:38 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-47767?

CVE-2026-47767 has a risk score of 52, indicating a moderate severity level.

2

How do I fix CVE-2026-47767?

To fix CVE-2026-47767, ensure that the updated version of symfony/runtime is applied to your project.

3

What software is affected by CVE-2026-47767?

CVE-2026-47767 affects the symfony/symfony and symfony/runtime packages.

4

What type of vulnerability is associated with CVE-2026-47767?

CVE-2026-47767 is classified under CWE-20, which pertains to Input Validation vulnerabilities.

5

What exploit does CVE-2026-47767 allow?

CVE-2026-47767 allows an unauthenticated GET request to manipulate the kernel environment and debug flags by using crafted query strings.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203