CVE-2026-47767·PHP vulnerability
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 parse_str() 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 APP_ENV or APP_DEBUG. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.
- Severity
- critical
- Software
- PHP
- Fixed in
- 8.0.12
- Published
- 2026-07-14
Affected versions
From: 8.0.0
Until: 8.0.12
Fixed in: 8.0.12
How to fix this CVE
Update PHP and Symfony to patch a critical argument injection vulnerability that allows attackers to bypass security controls through malformed query strings. Systems running PHP 8.0.0 through 8.0.11 must be upgraded to 8.0.12 or later. This fix ensures that query string parsing cannot be exploited to inject runtime flags that alter application environment settings.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST/GET requests containing query parameters with unusual encoding or whitespace followed by --env or --no-debug flags; pattern: (?:\?|&).*?(?:\-\-env|\-\-no-debug)=(?!.*\s)|query strings where $_GET appears empty but argv contains environment manipulation flagsWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block or sanitize query strings containing the substrings '--env' or '--no-debug'; implement strict whitelist validation on query parameter names to reject parameters resembling command-line flags; consider rate-limiting requests with malformed or suspicious query syntax.How to check if you are affected
- Check installed PHP version: php -v
- Verify Symfony version in composer.lock or vendor/symfony/symfony/VERSION file if installed via Composer
- Search application logs for unusual query strings containing --env or --no-debug flags: grep -r '\-\-env\|\-\-no-debug' /var/log/
- Confirm patch by running php -v again and verify the version is 8.0.12 or higher; check Symfony release tags at https://github.com/symfony/symfony/releases
FAQ
What is CVE-2026-47767?
This is a critical argument injection vulnerability in Symfony that allows attackers to inject malicious command-line flags (--env, --no-debug) through crafted query strings, bypassing prior security patches and potentially exposing sensitive application settings or enabling debug mode in production environments.
Is CVE-2026-47767 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available, though the critical CVSS score of 9.8 warrants immediate patching.
What versions of PHP are affected by CVE-2026-47767?
PHP 8.0.0 through 8.0.11 are affected. Earlier versions 5.4.46–5.4.51, 6.4.0–6.4.39, and 7.4.0–7.4.11 are also vulnerable depending on Symfony version.
How do I check if my server is vulnerable to CVE-2026-47767?
Run php -v to check your PHP version; if it is 8.0.11 or lower, your server is vulnerable. Cross-reference with your Symfony version in composer.lock to confirm exposure.
Does Defensia detect CVE-2026-47767?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP is installed on a monitored server, CVE-2026-47767 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
- https://github.com/symfony/symfony/commit/3228c3806ee511008bea19a95084d460b17e5d25
- https://github.com/symfony/symfony/releases/tag/v5.4.52
- https://github.com/symfony/symfony/releases/tag/v6.4.40
- https://github.com/symfony/symfony/releases/tag/v7.4.12
- https://github.com/symfony/symfony/releases/tag/v8.0.12
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-47767. Free for 1 server.
Get started free