# CVE-2026-45304: Symfony Yaml denial of service via recursive alias expansion

Source: https://junglewise.ai/threats/cve-2026-45304-symfony-yaml-denial-of-service-via-recursive-alias-expansion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-14. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-45304 · Severity: medium · CVSS 4 · Published 2026-07-14

A vulnerability in the Symfony PHP framework's YAML processing component could allow an attacker to crash a web application. By submitting a specially crafted, small YAML file, an attacker can force the server to consume massive amounts of memory, leading to a denial-of-service (DoS) condition. This affects any application that parses untrusted YAML input using the vulnerable versions of the library.

Technologies: [symfony/symfony (Packagist)](https://junglewise.ai/threats/technologies/symfony-symfony), [symfony/yaml (Packagist)](https://junglewise.ai/threats/technologies/symfony-yaml), [Symfony Yaml](https://junglewise.ai/threats/technologies/yaml). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Symfony](https://junglewise.ai/threats/vendors/symfony).

## Quick answers

**Is CVE-2026-45304 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45304 being exploited in the wild.

**How severe is CVE-2026-45304?** Medium severity, with a CVSS score of 4, published 14 July 2026.

**Which products and versions are affected?** symfony/symfony (Packagist) ECOSYSTEM:introduced=0,fixed=5.4.52; symfony/yaml (Packagist) ECOSYSTEM:introduced=0,fixed=5.4.52; Symfony Yaml < 5.4.52, >= 6.0.0-BETA1, < 6.4.40, >= 7.0.0-BETA1, < 7.4.12, >= 8.0.0-BETA1, < 8.0.12, < 5.4.52, >= 6.0.0, < 6.4.40, >= 7.0.0, < 7.4.12, >= 8.0.0, < 8.0.12.

**Is there a fix for CVE-2026-45304?** Yes. symfony/symfony (Packagist): upgrade to 5.4.52 or later; symfony/yaml (Packagist): upgrade to 5.4.52 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45304 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45304?** Check whether you run symfony/symfony (Packagist), symfony/yaml (Packagist) or Symfony Yaml at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- symfony/symfony (Packagist): upgrade to 5.4.52 or later

  ```sh
  composer require symfony/symfony:^5.4.52
  ```

- symfony/yaml (Packagist): upgrade to 5.4.52 or later

  ```sh
  composer require symfony/yaml:^5.4.52
  ```


## Technical details

The Symfony\Component\Yaml\Parser component fails to properly restrict the number of recursive collection aliases during YAML parsing. An attacker can provide a small, crafted YAML document containing recursive aliases that expand exponentially into a multi-gigabyte structure upon resolution. This leads to memory exhaustion and a denial-of-service (DoS) condition. The vulnerability is classified as CWE-776 (Improper Restriction of Recursive Entity References). The fix introduces a default limit of 128 resolved collection aliases and adds a new flag, Yaml::PARSE_EXCEPTION_ON_ALIAS, to allow developers to reject aliases entirely when handling untrusted input. Patches are available in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.

## Affected products

- Symfony symfony/symfony < 5.4.52, >= 6.0.0-BETA1, < 6.4.40, >= 7.0.0-BETA1, < 7.4.12, >= 8.0.0-BETA1, < 8.0.12
- Symfony symfony/yaml < 5.4.52, >= 6.0.0-BETA1, < 6.4.40, >= 7.0.0-BETA1, < 7.4.12, >= 8.0.0-BETA1, < 8.0.12

## Identifiers

- CVE-2026-45304
- GHSA-4qpc-3hr4-r2p4

## Timeline

- 2026-05-08: other: Initial fix authored
- 2026-05-20: patched: Security releases published
- 2026-07-14: advisory: NVD advisory published

## References

- [https://github.com/symfony/symfony/commit/e77391b2e4f18821198f010d573674c8ed4a970a](https://github.com/symfony/symfony/commit/e77391b2e4f18821198f010d573674c8ed4a970a)
- [https://github.com/symfony/symfony/releases/tag/v5.4.52](https://github.com/symfony/symfony/releases/tag/v5.4.52)
- [https://github.com/symfony/symfony/releases/tag/v6.4.40](https://github.com/symfony/symfony/releases/tag/v6.4.40)
- [https://github.com/symfony/symfony/releases/tag/v7.4.12](https://github.com/symfony/symfony/releases/tag/v7.4.12)
- [https://github.com/symfony/symfony/releases/tag/v8.0.12](https://github.com/symfony/symfony/releases/tag/v8.0.12)
- [https://github.com/symfony/symfony/security/advisories/GHSA-4qpc-3hr4-r2p4](https://github.com/symfony/symfony/security/advisories/GHSA-4qpc-3hr4-r2p4)

## Related threats

- [Symfony Yaml component ReDoS in parser and inline](https://junglewise.ai/threats/cve-2026-123792-the-symfony-yaml-components-inline-and-parser-parse-some-yaml)
- [Symfony YAML stack exhaustion in inline lexer](https://junglewise.ai/threats/cve-2026-109413-in-symfony-yaml-prior-to-versions-5-4-54-6-4-45-7-4-18-and-8-1-6)
- [Symfony HTTP Foundation ReDoS in HeaderUtils::split()](https://junglewise.ai/threats/cve-2026-108082-symfony-is-a-php-framework-for-web-and-console-applications-and)
- [Symfony Routing improper dot-segment encoding in UrlGenerator](https://junglewise.ai/threats/cve-2026-48784-symfony-routing-improper-dot-segment-encoding-in-urlgenerator)
- [Symfony HtmlSanitizer XSS via incomplete URL attribute sanitization](https://junglewise.ai/threats/cve-2026-48761-symfony-htmlsanitizer-xss-via-incomplete-url-attribute)
