GHSA-2v3c-qxhr-7vpv CVE-2026-109413
Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process
- Severity
- 0.0 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.40%
- Chance of exploitation in the next 30 days. Higher than 33.78% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-674 Uncontrolled Recursion
- Fix
- Available
- 2 packages have a fixed version
Description
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
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| symfony/symfony | >= 2.0.0, < 5.4.54 |
5.4.54 |
| symfony/symfony | >= 6.0.0, < 6.4.45 |
6.4.45 |
| symfony/symfony | >= 7.0.0, < 7.4.18 |
7.4.18 |
| symfony/symfony | >= 8.0.0, < 8.1.6 |
8.1.6 |
| symfony/yaml | >= 2.0.0, < 5.4.54 |
5.4.54 |
| symfony/yaml | >= 6.0.0, < 6.4.45 |
6.4.45 |
| symfony/yaml | >= 7.0.0, < 7.4.18 |
7.4.18 |
| symfony/yaml | >= 8.0.0, < 8.1.6 |
8.1.6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
symfony/symfony Packagist → 5.4.54
- composer
composer require symfony/symfony:^5.4.54
symfony/yaml Packagist → 5.4.54
- composer
composer require symfony/yaml:^5.4.54
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
Weakness
CWE-674: Uncontrolled Recursion
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
How to prevent it
- Implementation: Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
- Implementation: Increase the stack size.
References
Advisories
Packages
Other links
- github.com/symfony/symfony/security/advisories/GHSA-2v3c-qxhr-7vpv
- github.com/symfony/symfony/pull/65688
- github.com/symfony/symfony/commit/116287c3b5bc057e7a0420d2e52d384e14ea9417
- github.com/symfony/symfony/commit/2a8bf9c58d862b0c76a35ce288d1ba6a27223aad
- github.com/symfony/symfony/commit/8fb436fed9658a79d220e9f2b1ba8a2095559018
- github.com/symfony/symfony/commit/ab61e6cfd35042f16840a00f485eab2481dd4c2a
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-202…
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/yaml/CVE-2026-1…
- github.com/symfony/symfony/releases/tag/v5.4.54
- github.com/symfony/symfony/releases/tag/v6.4.45
- github.com/symfony/symfony/releases/tag/v7.4.18
- github.com/symfony/symfony/releases/tag/v8.1.6
- symfony.com/blog/cve-2026-109413-unbounded-recursion-in-the-yaml-inline-lexer-le…
- symfony.com/cve-2026-109413
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-r925-mgvr-h9cc Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header | High | Also affects symfony/symfony |
| GHSA-h5x3-xfc9-m39h Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization | Medium | Also affects symfony/symfony |
| GHSA-v3wm-qf9p-c549 Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense | Medium | Also affects symfony/symfony |
| GHSA-rrj9-5q2j-4gvr Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade | Medium | Also affects symfony/symfony |
| GHSA-38cx-cq6f-5755 Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient | High | Also affects symfony/symfony |
| GHSA-6h46-9jf5-q59x Symfony: Security Firewall Bypass via failure_forward Subrequest: Unauthenticated Access to access_control-Protected GET Routes | High | Also affects symfony/symfony |
| GHSA-x5qj-865h-mgvm Symfony: HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes | Medium | Also affects symfony/symfony |
| GHSA-fqc7-9xjw-jrh3 SymfonyRuntime CVE-2024-50340 Patch Bypass: Web Requests Can Still Set APP_ENV/APP_DEBUG via parse_str/SAPI Argv Mismatch | Critical | Also affects symfony/symfony |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor