Advisory

GHSA-9frc-8383-795m

Also known as: CVE-2026-45305

Summary

Symfony's YAML Parser has a ReDoS via Catastrophic Backtracking in Parser::cleanup() Regex

Details

Description

Symfony\Component\Yaml\Parser::cleanup() strips the optional %YAML directive header, leading comments, and document start/end markers before parsing. The original regexes contained overlapping quantifiers, most notably '#^%YAML[: ][\d.]+.*\n#u', whose [\d.]+ and .* overlap on the dot, that exhibit catastrophic backtracking on crafted input. A single oversized %YAML directive header (or comment / document-marker line) makes the parser hang for an arbitrarily long time, denying service.

Resolution

The four regexes in Parser::cleanup() (YAML directive header, leading comments, document-start marker, document-end marker) have been rewritten with possessive quantifiers and unambiguous character classes so backtracking cannot occur.

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2026-05-27 21:34 UTC
Modified
2026-09-10 03:51 UTC

Affected packages and fixes

symfony/yaml

Packagist · All systems

Affected

  • introduced 0, fixed 5.4.52 (ecosystem)

Fixed versions

5.4.52

Fix

The export has no generic command for this ecosystem.

symfony/symfony

Packagist · All systems

Affected

  • introduced 0, fixed 5.4.52 (ecosystem)

Fixed versions

5.4.52

Fix

The export has no generic command for this ecosystem.

symfony/symfony

Packagist · All systems

Affected

  • introduced 6.0.0, fixed 6.4.40 (ecosystem)

Fixed versions

6.4.40

Fix

The export has no generic command for this ecosystem.

symfony/symfony

Packagist · All systems

Affected

  • introduced 7.0.0, fixed 7.4.12 (ecosystem)

Fixed versions

7.4.12

Fix

The export has no generic command for this ecosystem.

symfony/symfony

Packagist · All systems

Affected

  • introduced 8.0.0, fixed 8.0.12 (ecosystem)

Fixed versions

8.0.12

Fix

The export has no generic command for this ecosystem.

symfony/yaml

Packagist · All systems

Affected

  • introduced 6.0.0, fixed 6.4.40 (ecosystem)

Fixed versions

6.4.40

Fix

The export has no generic command for this ecosystem.

symfony/yaml

Packagist · All systems

Affected

  • introduced 7.0.0, fixed 7.4.12 (ecosystem)

Fixed versions

7.4.12

Fix

The export has no generic command for this ecosystem.

symfony/yaml

Packagist · All systems

Affected

  • introduced 8.0.0, fixed 8.0.12 (ecosystem)

Fixed versions

8.0.12

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences