Low

Symfony hardened the parser when handling untrusted input

  • Disclosed: 27.05.2026
  • Updated: 11.10.2026 10:22

Description

Symfony\Component\Yaml\Parser is the entry point for parsing YAML strings into PHP values via Yaml::parse(). When the parser is exposed to attacker-controlled input, deeply nested mappings or sequences cause both the block-level (Parser::parseBlock()) and inline (Inline::parseSequence() / Inline::parseMapping()) parsers to recurse without a depth limit. A crafted document exhausts the PHP stack and crashes the worker.

Resolution

The Parser now tracks recursion depth in a shared ParserState object across both block-level and inline parsing, with a default limit of 128. The limit is configurable via a new $maxNestingLevel argument on Parser::__construct(), Yaml::parse() and Yaml::parseFile().

The patch for this issue is available here for branch 5.4.

Credits

Symfony would like to thank Pietro Tirenna (Shielder) for reporting the issue and Nicolas Grekas for fixing it.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package symfony/symfony < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12 5.4.52, 6.4.40, 7.4.12, 8.0.12
Composer package symfony/yaml < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12 5.4.52, 6.4.40, 7.4.12, 8.0.12

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U
Weakness (CWE)
CWE-1333, CWE-674, CWE-776
Platform
Composer
Package
symfony/symfony, symfony/yaml
Disclosed
27.05.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-c2p3-7m5p-cv8x - CC BY 4.0

Vulnerability history: symfony/yaml

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
5
First → latest
05.2022 05.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2
  • Low 3

Disclosures per year

  1. 2022: 2
  2. 2023: 0
  3. 2024: 0
  4. 2025: 0
  5. 2026: 3
  1. Low CVE-2026-45305 < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12 5.4.52, 6.4.40, 7.4.12, 8.0.12
  2. Low CVE-2026-45304 < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12 5.4.52, 6.4.40, 7.4.12, 8.0.12
  3. Symfony hardened the parser when handling untrusted input this entry
    Low CVE-2026-45133 < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12 5.4.52, 6.4.40, 7.4.12, 8.0.12
  4. High CVE-2013-1348 >= 2.0.0, < 2.0.22 2.0.22
  5. High CVE-2013-1397 >= 2.0.0, < 2.0.22, >= 2.1.0, < 2.1.7, >= 2.2.0-BETA1, < 2.2.0-BETA2 2.0.22, 2.1.7, 2.2.0-BETA2

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.