{"id":"CVE-2026-45304","aliases":["CVE-2026-45304","GHSA-4qpc-3hr4-r2p4"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: YAML Parser Exponential Memory Allocation via Recursive Collection-Alias Expansion (\"Billion Laughs\")","summary":"Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, Symfony\\Component\\Yaml\\Parser resolved YAML collection aliases recursively, allowing a small untrusted YAML input to expand into a multi-gigabyte structure and exhaust memory. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, Symfony\\Component\\Yaml\\Parser resolved YAML collection aliases recursively, allowing a small untrusted YAML input to expand into a multi-gigabyte structure and exhaust memory. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.","source":"cvelist"},{"lang":"en","text":"### Description\n\n`Symfony\\Component\\Yaml\\Parser` resolves YAML aliases (`*anchor`) during parsing. Aliases that reference *collections* (arrays, `stdClass`, `TaggedValue`-wrapped collections) can themselves point to other collections containing aliases, creating exponential expansion at resolution time. A small input can blow up into a multi-gigabyte structure and exhaust memory: the classic \"Billion Laughs\" denial-of-service against any parser exposed to untrusted YAML.\n\n### Resolution\n\nThe `Parser` now counts collection alias resolutions in a shared `ParserState` object, with a default limit of **128**, following the [SnakeYAML model](https://github.com/snakeyaml/snakeyaml/blob/master/src/main/java/org/yaml/snakeyaml/LoaderOptions.java). Scalar aliases remain unrestricted since they cannot drive exponential growth. The limit is configurable via a new `$maxAliasesForCollections` argument on `Parser::__construct()`, `Yaml::parse()` and `Yaml::parseFile()`. A new `Yaml::PARSE_EXCEPTION_ON_ALIAS` flag also rejects all aliases outright when parsing fully untrusted input.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/e77391b2e4f18821198f010d573674c8ed4a970a) 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.","format":"markdown","source":"ghsa"}],"published":"2026-05-27T21:33:50.000Z","modified":"2026-09-10T03:50:45.630Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-776"],"affected":[{"ranges":[{"version":"< 5.4.52","status":"affected"},{"version":">= 6.0.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"version":"< 5.4.52","status":"affected"},{"version":">= 6.0.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"yaml","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/yaml","purl":"pkg:composer/symfony/yaml","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/yaml","purl":"pkg:composer/symfony/yaml","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/yaml","purl":"pkg:composer/symfony/yaml","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/yaml","purl":"pkg:composer/symfony/yaml","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.4.52"},{"status":"affected","introduced":"6.0.0","fixed":"6.4.40"},{"status":"affected","introduced":"7.0.0","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.12"}],"vendor":"sensiolabs","product":"symfony","cpe":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-4qpc-3hr4-r2p4","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/e77391b2e4f18821198f010d573674c8ed4a970a","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v5.4.52","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.40","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.0.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45304.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/yaml/CVE-2026-45304.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2026-45304","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-14T19:13:27.727Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45304","url":"https://www.cve.org/CVERecord?id=CVE-2026-45304","licence":"CVE Terms of Use","modified":"2026-07-14T19:13:39.323Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4qpc-3hr4-r2p4","url":"https://github.com/advisories/GHSA-4qpc-3hr4-r2p4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:45.630Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45304","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45304","licence":"Public domain","modified":"2026-07-15T14:55:30.250Z"}],"updatedAt":"2026-11-25T22:59:28.158Z","epss":{"score":0.00684,"percentile":0.47805,"date":"2026-11-30T12:00:22.000Z"}}