CVE-2026-121949: Symfony HtmlSanitizer media URL policy bypass in srcset attributes

CVE-2026-121949 · Severity: info · Published 2026-11-05

Symfony's HtmlSanitizer component, which removes malicious code from user-supplied HTML, fails to validate image URLs in srcset and imagesrcset attributes even when strict allowlists for hosts and schemes are configured. An attacker can craft HTML with images pointing to blocked hosts or schemes that the browser will load anyway, enabling tracking of viewers or logging of their IP addresses without authentication.

Technologies: Symfony HtmlSanitizer. Vendors: Symfony.

Quick answers

Is CVE-2026-121949 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-121949 being exploited in the wild.
How severe is CVE-2026-121949?
Informational severity, published 5 November 2026.
Which products and versions are affected?
Symfony HtmlSanitizer 6.1.0 to 6.4.49, 7.0.0 to 7.4.22, 8.0.0 to 8.1.10.
Is there a fix for CVE-2026-121949?
Yes: fixed in HtmlSanitizer 6.4.50, 7.4.23, 8.1.11. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-121949 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-121949?
Check whether you run 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

  • Fixed in: HtmlSanitizer 6.4.50, 7.4.23, 8.1.11

Technical details

The HtmlSanitizer allows srcset (img, source elements) and imagesrcset (link elements) attributes but does not apply the media URL policy enforced by allowMediaSchemes() and allowMediaHosts() to their values. An unauthenticated attacker can supply HTML with srcset candidates pointing to disallowed hosts or schemes; these bypass validation and the browser fetches them, making the vulnerability network-accessible to any application sanitizing untrusted HTML.

Affected products

  • Symfony HtmlSanitizer 6.1.0 to 6.4.49, 7.0.0 to 7.4.22, 8.0.0 to 8.1.10

Timeline

  • 2026-11-05: disclosed

References

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