Symfony APP_ENV/APP_DEBUG Bypass via argv/$_GET Parsing Discrepancy
First seen Jul 16, 2026 · Updated Jul 16, 2026 · CVSS 9.8
A flaw in Symfony's fix for CVE-2024-50340 fails to properly prevent attacker-controlled environment flags from reaching the application via a discrepancy between parse_str() and the web SAPI's handling of $_GET. This allows remote attackers to craft query strings that manipulate $_SERVER['argv'] to inject --env or --no-debug flags, potentially flipping an application into debug mode or altering its environment configuration. Given the 9.8 CVSS score, this is a critical, low-complexity, remotely exploitable issue affecting a widely used PHP framework.
Technical Analysis
The vulnerability stems from an incomplete fix to CVE-2024-50340, which gated runtime argv parsing on the condition that $_GET be empty. However, parse_str() and Symfony's web SAPI handling can disagree on how query strings are parsed, enabling an attacker to construct a request where $_GET appears empty to the check but $_SERVER['argv'] still contains attacker-supplied --env or --no-debug flags. This allows remote, unauthenticated manipulation of APP_ENV and APP_DEBUG, which can expose debug toolbars, verbose stack traces, internal configuration data, and potentially enable further exploitation chains (e.g., RCE via debug mode features or information disclosure of secrets). Because Symfony underlies many PHP backend services, including API gateways and orchestration layers used by RAG pipelines and agent tool-calling backends, exploitation could expose API keys, database credentials, or internal service endpoints that AI agents rely on, indirectly compromising agent-integrated infrastructure.
Affected Systems
Symfony framework versions from 5.4.46 until 5.4.52, 6.4.40, 7.4.12, and 8.0.12; any PHP web applications built on these Symfony versions exposed to untrusted HTTP requests.
Indicators of Compromise
- No specific IOCs published; exploitation would appear as anomalous query strings containing --env or --no-debug patterns in access logs, e.g. requests with crafted parameter names causing parse_str()/$_GET divergence.
Remediation Steps
- 1
Upgrade Symfony
Update to patched versions 5.4.52, 6.4.40, 7.4.12, or 8.0.12 or later immediately.
- 2
Audit Debug Mode Exposure
Review production environments for accidental APP_DEBUG=true exposure and rotate any secrets that may have been exposed via debug toolbars or stack traces.
- 3
Input Validation at Web Server/WAF
Deploy WAF rules to detect and block anomalous query strings attempting to manipulate argv-style parameters.
- 4
Log Monitoring
Monitor application and access logs for unusual query parameters resembling CLI flags (--env, --no-debug) in HTTP requests.
- 5
Credential Rotation for Agent-Integrated Services
If Symfony powers backend APIs used by AI agent or RAG pipelines, rotate any API keys or credentials that could be exposed via debug mode information disclosure.
CVE / Advisory IDs
Industries Most Exposed
Respond to this threat
Pro subscribers get a full AI-generated incident-response playbook for this threat — detection, containment, eradication, and recovery steps — plus an unlimited AI Threat Advisor for questions about your environment.