Inefficient Algorithmic Complexity Affecting symfony/yaml package, versions <5.4.56>=6.0.0, <6.4.50>=7.0.0, <7.4.23>=8.0.0, <8.1.11


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.74% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-SYMFONYYAML-23184438
  • published1 Dec 2026
  • disclosed6 Nov 2026
  • creditSebastian Bergmann, Bruno Dias

Introduced: 6 Nov 2026

NewCVE-2026-123792  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade symfony/yaml to version 5.4.56, 6.4.50, 7.4.23, 8.1.11 or higher.

Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the Inline and Parser components, which parse certain YAML documents in time that grows exponentially or quadratically with input size. An embedded mapping in a flow sequence is re-parsed for every scalar appended to it, causing exponential growth with nesting depth. Patterns matching mapping keys and tags scan each run of spaces once per character, and each scalar of a flow collection is matched against a copy of the rest of the collection, causing quadratic growth with input size. Additional constructs - including empty sequence items followed by blank lines, anchors named 0, and deeply nested blocks - trigger similar repeated work, consuming both CPU time and memory. A single small YAML document can keep a PHP worker busy for seconds or minutes, exhausting the process until max_execution_time.

Note: For #[MapRequestPayload] on Symfony 6.4, YAML payloads are only accepted when the application explicitly registers a yaml request format.

CVSS Base Scores

version 4.0
version 3.1