/

CVE-2026-45133

Severity:

HIGH RISK

(7.5)

Recursive YAML Parsing (CWE-776) in Symfony Input

CVE-2026-45133

Analyzed

Vulnerability type

Category:

Denial of Service via Resource Exhaustion

CWE:

CWE-674, CWE-776, CWE-1333

Impact:

Application-level Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Symfony's YAML parsing components can be driven into uncontrolled recursion when processing attacker-controlled documents containing deeply nested mappings or sequences.

Under these conditions, a crafted payload can exhaust the PHP call stack and crash the worker process, leading to denial of service against affected applications.

Affected context

This vulnerability manifests in Symfony-based applications that accept or process YAML or YAML-like content derived from user input, external configuration feeds, or integrated services.

It is most relevant where the YAML parser is reachable through public or semi-public interfaces and where worker processes are long-lived or shared across multiple requests, since a single malicious document can bring down the handling worker and temporarily disrupt service.

Exploit preconditions

  • Attack surface: Any endpoint or processing path that passes attacker-controlled or untrusted YAML data to Symfony's YAML parser.
  • Required access: Ability to submit or influence YAML documents (e.g., API payloads, uploaded configuration files, or data from external integrations).
  • Trigger point: Invocation of Parser::parseBlock() or Inline::parseSequence() / Inline::parseMapping() on a deeply nested structure without enforcing a recursion or nesting depth limit.
  • Why exploitation is possible: The parsing logic recursively descends into nested mappings and sequences without guarding against excessive depth, allowing an attacker to craft input that drives the PHP interpreter into stack exhaustion.

Why this happens

The core issue stems from recursive parsing logic that does not cap nesting depth when processing mappings and sequences.

Both the block-level parser and the inline parser follow the structure of the input document by calling themselves repeatedly for each nested element.

In line with CWE-776: Improper Restriction of Recursive Resource Consumption and CWE-674: Uncontrolled Resource Consumption, this unbounded recursion lets an attacker consume stack resources simply by increasing the document's nesting depth, ultimately leading to a crash.

Potential impact

  • A single malformed YAML payload can cause the PHP worker process to crash.
  • Attackers may continuously send crafted documents to induce sustained denial of service.
  • Shared worker pools or process managers may experience instability or degraded performance.
  • Logging, monitoring, or background jobs that rely on the same parser can be disrupted.

General mitigation guidance

Effective mitigation focuses on limiting recursion and constraining how untrusted documents are parsed.

Common defensive patterns include:

  • Enforcing a maximum nesting depth for mappings and sequences during parsing, failing fast on overly deep documents.
  • Validating and sanitizing input before passing it to the YAML parser, rejecting structures that do not match an expected schema.
  • Separating trusted configuration parsing from user-facing input handling, using stricter parsing rules or different components for untrusted data.
  • Applying operational controls such as request rate limiting and per-worker resource caps to minimize the impact of attempted exhaustion.

How teams detect issues like this

Detection can rely on both code-level and runtime signals.

At the code level, static analysis or manual review can flag usages of Symfony's YAML parsing APIs where untrusted input is accepted without depth checks, schema validation, or defensive wrappers.

Runtime monitoring can look for repeated worker crashes, elevated error rates, and consistent stack exhaustion traces tied to YAML parsing functions.

Security-focused automated review tools and CI checks can enforce internal policies that require bounded recursion and structured validation for all parsing of external data.

Sources

SourceLink
github.comgithub.com/symfony/symfony/releases/tag/v5.4.52
github.comgithub.com/symfony/symfony/releases/tag/v6.4.40
github.comgithub.com/symfony/symfony/releases/tag/v7.4.12
github.comgithub.com/symfony/symfony/releases/tag/v8.0.12
github.comgithub.com/symfony/symfony/security/advisories/GHSA-c2p3-7m5p-cv8x

Frequently asked

questions

It is exploitable wherever attackers can cause Symfony to parse YAML derived from their input. If the parser is only used for internal, trusted configuration, the practical exposure is lower, but any public or partner-facing YAML endpoints increase the risk.

An attacker needs the ability to submit or influence YAML documents that are processed by Symfony's parser. This could be through an API, uploaded files, or another integration path that ultimately feeds untrusted data into the parsing routines.

The most robust approach is to introduce strict limits on recursion and nesting depth in the parser, combined with schema-driven validation that ensures documents conform to expected structures before deep parsing is attempted.

When designing data processing features, prefer parsers and algorithms that are resilient to adversarial input, enforce clear resource bounds (depth, size, and complexity), and separate trusted configuration parsing from user-controlled data. Complement this with automated checks and code review guidelines that highlight unbounded recursion or complex parsing paths on untrusted input.

Find out what's already
exploitable in your codebase.