Skip to main content
Vulnerability Database/CVE-2026-109413

CVE-2026-109413: Symfony YAML DOS Vulnerability

CVE-2026-109413 is a denial of service flaw in Symfony YAML that causes stack exhaustion through deeply nested inline collections. This post explains its technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109413 Overview

CVE-2026-109413 is a denial-of-service vulnerability in the Symfony YAML component. The Yaml\Parser::lexInlineStructure() method recurses through lexInlineMapping() and lexInlineSequence() for every { and [ in an inline collection, without honoring the maxNestingLevel bound enforced elsewhere in the parser. A document composed of deeply nested inline collections such as [[[[...]]]] exhausts the PHP call stack during lexing. Depending on the PHP build and stack configuration, the process crashes or the request terminates with a fatal error. Any application parsing untrusted YAML is exposed, including Symfony endpoints using #[MapRequestPayload] when the YAML component is installed and acceptFormat is not restricted.

Critical Impact

A single unauthenticated HTTP request carrying a crafted YAML body can crash the PHP worker process handling it, enabling repeatable denial of service against affected Symfony applications.

Affected Products

  • symfony/yaml through v5.4.53
  • symfony/yaml v6.0.0-BETA1 through v6.4.44
  • symfony/yaml v7.0.0-BETA1 through v7.4.17 and v8.0.0-BETA1 through v8.1.5

Discovery Timeline

  • 2026-10-15 - CVE-2026-109413 published to the National Vulnerability Database (NVD)
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-109413

Vulnerability Analysis

The flaw is an uncontrolled recursion issue [CWE-674] in the inline lexer of the Symfony YAML parser. Symfony's YAML parser bounds structural nesting through a maxNestingLevel counter that is incremented when the parser descends into nested structures. The inline lexing path, implemented by lexInlineStructure(), lexInlineMapping(), and lexInlineSequence(), recurses directly on each opening { or [ character without updating that counter. Because the lexer runs before structural parsing, the depth guard never fires. A YAML document consisting of many thousands of nested brackets forces PHP to grow its native call stack until the configured stack size is exhausted, terminating the process.

The impact is a reliable denial of service against any PHP process that parses attacker-controlled YAML. The vulnerability does not expose confidentiality or integrity, but it affects availability of the worker handling the malicious request and any subsequent requests queued to that worker.

Root Cause

The inline lexing routines invoke themselves recursively for every nested inline collection without participating in Symfony's existing nesting-level accounting. The parser-level maxNestingLevel safeguard is bypassed because recursion occurs in the tokenizer, not in the structural parser. PHP's recursion is implemented on the native C stack, so unbounded recursion crashes the interpreter rather than raising a catchable exception.

Attack Vector

Exploitation requires only the ability to submit a YAML payload to a parser. In Symfony applications using #[MapRequestPayload] with the YAML component installed, a single unauthenticated POST request with a YAML content type and a body such as [[[[...]]]] is sufficient to crash the handling process. Command-line tools, message consumers, and configuration loaders that parse YAML from untrusted sources are equally affected. See the Symfony blog analysis and GHSA-2v3c-qxhr-7vpv for the full technical write-up. No proof-of-concept code is published beyond the conceptual description in the advisory.

Detection Methods for CVE-2026-109413

Indicators of Compromise

  • PHP-FPM or CLI worker processes terminating with segmentation faults or Allowed memory / stack-overflow fatal errors coinciding with inbound HTTP requests.
  • HTTP requests to Symfony endpoints with Content-Type: application/yaml or application/x-yaml containing long runs of [ or { characters.
  • Web server logs showing abrupt 502 or 504 responses from endpoints that accept request payloads mapped via #[MapRequestPayload].

Detection Strategies

  • Inspect reverse-proxy and application logs for request bodies with abnormally high counts of consecutive opening brackets or braces targeting YAML-capable endpoints.
  • Correlate PHP worker crash events in system logs (dmesg, journalctl, php-fpm error logs) with inbound request timing to identify triggering payloads.
  • Audit installed Composer packages for vulnerable symfony/yaml versions using composer why symfony/yaml and composer outdated symfony/yaml.

Monitoring Recommendations

  • Alert on repeated PHP process restarts, segmentation faults, or fatal errors referencing stack exhaustion within short time windows.
  • Baseline the maximum payload depth accepted by application endpoints and alert when inbound payloads exceed that depth.
  • Track 4xx and 5xx rates on endpoints annotated with #[MapRequestPayload] or otherwise known to deserialize YAML.

How to Mitigate CVE-2026-109413

Immediate Actions Required

  • Upgrade symfony/yaml to a patched release: 5.4.54, 6.4.45, 7.4.18, or 8.1.6.
  • Inventory all services that call Yaml::parse() or expose YAML-accepting HTTP endpoints and prioritize patching those exposed to untrusted input.
  • Restrict acceptFormat on controllers using #[MapRequestPayload] so YAML is accepted only where explicitly required.

Patch Information

The fix is tracked in the Symfony repository under Pull Request #65688 and detailed in GHSA-2v3c-qxhr-7vpv. The patch extends the parser's nesting-level accounting into the inline lexer so deeply nested inline collections raise a ParseException instead of exhausting the PHP stack. Upgrade to symfony/yaml 5.4.54, 6.4.45, 7.4.18, or 8.1.6 via composer update symfony/yaml.

Workarounds

  • Reject requests with YAML content types at the reverse proxy or web application firewall for endpoints that do not require YAML input.
  • Enforce a maximum request body size that is well below what is needed to construct a stack-exhausting payload.
  • Avoid passing untrusted input directly to Yaml::parse(); validate payload structure or convert input to JSON before deserialization where feasible.
bash
# Upgrade symfony/yaml to a patched release
composer require symfony/yaml:"^5.4.54 || ^6.4.45 || ^7.4.18 || ^8.1.6"
composer update symfony/yaml

# Verify installed version
composer show symfony/yaml | grep versions

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.