Uncontrolled Recursion Affecting symfony/yaml package, versions >=4.1.0, <5.4.54>=6.0.0, <6.4.45>=7.0.0, <7.4.16>=8.0.0, <8.1.6


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.4% (34th 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-21203849
  • published18 Oct 2026
  • disclosed15 Oct 2026
  • creditBruno Dias

Introduced: 15 Oct 2026

NewCVE-2026-109413  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade symfony/yaml to version 5.4.54, 6.4.45, 7.4.16, 8.1.6 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via Parser::lexInlineStructure(), which recurses through lexInlineMapping() and lexInlineSequence() without incrementing the shared nesting-level counter that guards against excessive depth. Because the maxNestingLevel guard is only checked after the lexer returns, a deeply nested inline YAML document (e.g. thousands of nested { or [ characters) exhausts available memory inside the lexer before the guard is ever reached, causing the process to crash. The fix enters and leaves the shared nesting level at the boundary of lexInlineStructure(), so the existing maximum-nesting-depth error is raised consistently for both block and inline structures.

CVSS Base Scores

version 4.0
version 3.1