SymfonyRuntime CVE-2024-50340 Patch Bypass: Web Requests Can Still Set APP_ENV/APP_DEBUG via parse_str/SAPI Argv Mismatch
CVE-2026-47767 · GHSA-fqc7-9xjw-jrh3
- Affected
- Packagist symfony/runtime >= 5.4.46, < 5.4.52; >= 6.4.14, < 6.4.40; >= 7.1.7, < 7.4.12; >= 8.0.0, < 8.0.12
- Fixed in
- 8.0.127.4.126.4.405.4.52· Vendor fix available
- Issue
- 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…
Recommended action: Upgrade to 8.0.12, 7.4.12, 6.4.40 or 5.4.52 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.