CVE-2026-45066: Symfony HtmlSanitizer URL allowlist bypass in URL parser

CVE-2026-45066 · Severity: medium · CVSS 0 · Published 2026-07-14

A vulnerability in the Symfony PHP framework's HTML sanitization component could allow malicious links to bypass security filters. This component is used by developers to clean user-provided content and prevent security risks like phishing or unauthorized redirects. If exploited, an attacker could trick users into visiting malicious websites that were supposed to be blocked by the application's safety rules.

Technologies: symfony/html-sanitizer (Packagist), symfony/symfony (Packagist), Symfony HtmlSanitizer. Vendors: Packagist, Symfony.

Quick answers

Is CVE-2026-45066 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45066 being exploited in the wild.
How severe is CVE-2026-45066?
Medium severity, with a CVSS score of 0, published 14 July 2026.
Which products and versions are affected?
symfony/html-sanitizer (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.40; symfony/symfony (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.40; Symfony HtmlSanitizer >= 6.1.0, < 6.4.40; >= 7.0.0, < 7.4.12; >= 8.0.0, < 8.0.12.
Is there a fix for CVE-2026-45066?
Yes. symfony/html-sanitizer (Packagist): upgrade to 6.4.40 or later; symfony/symfony (Packagist): upgrade to 6.4.40 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45066 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45066?
Check whether you run symfony/html-sanitizer (Packagist), symfony/symfony (Packagist) or Symfony HtmlSanitizer 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/html-sanitizer (Packagist): upgrade to 6.4.40 or later
    composer require symfony/html-sanitizer:^6.4.40
  • symfony/symfony (Packagist): upgrade to 6.4.40 or later
    composer require symfony/symfony:^6.4.40

Technical details

A vulnerability exists in Symfony's HtmlSanitizer component where URL allowlists can be bypassed. The root cause is twofold: first, UrlSanitizer::parse() follows RFC 3986 while modern browsers follow the WHATWG URL spec, creating a parser differential that allows specially crafted URLs to bypass host checks. Second, the <area href> attribute was incorrectly validated against the media policy instead of the link policy. An attacker can exploit this by providing malicious HTML content that includes links to unauthorized domains. The issue is resolved in versions 6.4.40, 7.4.12, and 8.0.12.

Affected products

  • Symfony symfony/symfony >= 6.1.0-BETA1, < 6.4.40; >= 7.0.0-BETA1, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12
  • Symfony symfony/html-sanitizer >= 6.1.0-BETA1, < 6.4.40; >= 7.0.0-BETA1, < 7.4.12; >= 8.0.0-BETA1, < 8.0.12

Identifiers

  • CVE-2026-45066
  • GHSA-qc95-4862-92fh

Timeline

  • 2026-07-14: disclosed
  • 2026-07-14: advisory
  • 2026-05-20: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.