Summary
Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process
Description
Yaml\Parser::lexInlineStructure() recursed through lexInlineMapping() and lexInlineSequence() for every { and [ of an inline collection, without entering the nesting level that the rest of the parser bounds with maxNestingLevel. A document made of deeply nested inline collections, such as [[[[...]]]], exhausted the stack while it was being lexed: depending on the PHP version and its stack settings, the process crashed or the request ended with a fatal error.
Any code parsing untrusted YAML is affected. That includes #[MapRequestPayload] when the Yaml component is installed and the endpoint does not restrict acceptFormat: a single unauthenticated request with a YAML content type is enough.
Resolution
The inline lexer now enters and leaves the same nesting level as the rest of the parser, so nested inline collections are bounded by maxNestingLevel, and the parser raises a ParseException beyond it.
The patches for this issue are available here for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).
Credits
We would like to thank Nicolas Grekas for reporting the issue and providing the fix.
References
- Fix: #65688
Impact
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
symfony/symfony to 5.4.54 or later; symfony/symfony to 6.4.45 or later; symfony/symfony to 7.4.18 or later; symfony/symfony to 8.1.6 or later; symfony/yaml to 5.4.54 or later; symfony/yaml to 6.4.45 or later; symfony/yaml to 7.4.18 or later; symfony/yaml to 8.1.6 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-109413? CVE-2026-109413 is a high-severity security vulnerability in symfony/symfony (composer), affecting versions >= 2.0.0, < 5.4.54. It is fixed in 5.4.54, 6.4.45, 7.4.18, 8.1.6.
- Which packages are affected by CVE-2026-109413?
symfony/symfony(composer) (versions >= 2.0.0, < 5.4.54)symfony/yaml(composer) (versions >= 2.0.0, < 5.4.54)
- Is there a fix for CVE-2026-109413? Yes. CVE-2026-109413 is fixed in 5.4.54, 6.4.45, 7.4.18, 8.1.6. Upgrade to this version or later.
- Is CVE-2026-109413 exploitable, and should I be worried? Whether CVE-2026-109413 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-109413 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-109413?
- Upgrade
symfony/symfonyto 5.4.54 or later - Upgrade
symfony/symfonyto 6.4.45 or later - Upgrade
symfony/symfonyto 7.4.18 or later - Upgrade
symfony/symfonyto 8.1.6 or later - Upgrade
symfony/yamlto 5.4.54 or later - Upgrade
symfony/yamlto 6.4.45 or later - Upgrade
symfony/yamlto 7.4.18 or later - Upgrade
symfony/yamlto 8.1.6 or later
- Upgrade