{"id":"CVE-2026-45305","aliases":["GHSA-9frc-8383-795m"],"url":"https://o3.security/vulnerability/CVE-2026-45305","summary":"Symfony: YAML Parser ReDoS via Catastrophic Backtracking in Parser::cleanup() Regex","details":"### Description\n\n`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.\n\n### Resolution\n\nThe 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.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/9749cd43c5e09b3735093623670b21b9d8a056cb) for branch 5.4.\n\n### Credits\n\nSymfony would like to thank Pietro Tirenna (Shielder) for reporting the issue and Nicolas Grekas for fixing it.","published":"2026-07-14T18:50:14.830Z","modified":"2026-08-12T03:51:26.959788522Z","cvss":null,"epss":{"score":0.00684,"percentile":0.50951,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"symfony/yaml","fixedVersion":"5.4.52"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"5.4.52"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"6.4.40"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"7.4.12"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"8.0.12"},{"ecosystem":"Packagist","name":"symfony/yaml","fixedVersion":"6.4.40"},{"ecosystem":"Packagist","name":"symfony/yaml","fixedVersion":"7.4.12"},{"ecosystem":"Packagist","name":"symfony/yaml","fixedVersion":"8.0.12"}],"fix":{"url":"https://github.com/symfony/symfony/commit/9749cd43c5e09b3735093623670b21b9d8a056cb","label":"symfony/symfony@9749cd4"},"references":[{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v5.4.52"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v6.4.40"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v7.4.12"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v8.0.12"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45305.json"},{"type":"ADVISORY","url":"https://github.com/symfony/symfony/security/advisories/GHSA-9frc-8383-795m"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45305"},{"type":"FIX","url":"https://github.com/symfony/symfony/commit/9749cd43c5e09b3735093623670b21b9d8a056cb"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45305.yaml"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/yaml/CVE-2026-45305.yaml"},{"type":"PACKAGE","url":"https://github.com/symfony/symfony"},{"type":"WEB","url":"https://symfony.com/cve-2026-45305"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:26.959788522Z"}}