{"id":"CVE-2026-47767","aliases":["CVE-2026-47767","GHSA-fqc7-9xjw-jrh3"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: SymfonyRuntime CVE-2024-50340 Patch Bypass: Web Requests Can Still Set APP_ENV/APP_DEBUG via parse_str/SAPI Argv Mismatch","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Description\n\nCVE-2024-50340 (GHSA-x8vp-gf4q-mw5j) addressed an issue where, with `register_argc_argv=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\".\n\nThat proxy is unsafe: `parse_str()` (which builds `$_GET`) and the web SAPI (which builds `$_SERVER['argv']` from the raw query when `register_argc_argv=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.\n\nPreconditions and impact match the original CVE: web SAPI, `register_argc_argv=On`, app booted through `symfony/runtime`; from an unauthenticated GET an attacker can flip `APP_ENV` and toggle `APP_DEBUG`.\n\n### Resolution\n\n`SymfonyRuntime` now gates the argv read on `isset($_SERVER['QUERY_STRING'])` rather than on `empty($_GET)`. `QUERY_STRING` 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 `QUERY_STRING` is unset.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/3228c3806ee511008bea19a95084d460b17e5d25) for branch 5.4.\n\n### Credits\n\nSymfonyRuntime would like to thank 0xEr3n for reporting the issue and Nicolas Grekas for providing the fix.","format":"markdown","source":"ghsa"}],"published":"2026-06-09T21:58:11.000Z","modified":"2026-09-10T03:50:49.571Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-74","CWE-436"],"affected":[{"ranges":[{"version":">= 5.4.46, < 5.4.52","status":"affected"},{"version":">= 6.4.14, < 6.4.40","status":"affected"},{"version":">= 7.1.7, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"version":">= 5.4.46, < 5.4.52","status":"affected"},{"version":">= 6.4.14, < 6.4.40","status":"affected"},{"version":">= 7.1.7, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"runtime","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.4.46","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/runtime","purl":"pkg:composer/symfony/runtime","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.4.14","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/runtime","purl":"pkg:composer/symfony/runtime","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.1.7","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/runtime","purl":"pkg:composer/symfony/runtime","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/runtime","purl":"pkg:composer/symfony/runtime","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.4.46","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.4.14","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.1.7","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"5.4.46","fixed":"5.4.52"},{"status":"affected","introduced":"6.4.14","fixed":"6.4.40"},{"status":"affected","introduced":"7.1.7","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.12"}],"vendor":"sensiolabs","product":"symfony","cpe":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-fqc7-9xjw-jrh3","tags":["not-applicable","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/3228c3806ee511008bea19a95084d460b17e5d25","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v5.4.52","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.40","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.0.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-07-16T14:33:22.499Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47767","url":"https://www.cve.org/CVERecord?id=CVE-2026-47767","licence":"CVE Terms of Use","modified":"2026-07-16T14:34:59.539Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fqc7-9xjw-jrh3","url":"https://github.com/advisories/GHSA-fqc7-9xjw-jrh3","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:49.571Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47767","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47767","licence":"Public domain","modified":"2026-07-16T15:16:31.723Z"}],"updatedAt":"2026-11-25T22:59:28.165Z","epss":{"score":0.00389,"percentile":0.35126,"date":"2026-12-01T12:00:22.000Z"}}