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

Source: https://junglewise.ai/threats/cve-2026-121949-the-symfony-htmlsanitizer-component-does-not-apply-the-media-url  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-05. Updated: 2026-11-05  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/htmlsanitizer). Vendors: [Symfony](https://junglewise.ai/threats/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

- [https://packagist.org/packages/symfony/html-sanitizer](https://packagist.org/packages/symfony/html-sanitizer)
- [https://github.com/symfony/symfony/commit/50e7a38a8f088601c09669b9d267c9c0228884e1](https://github.com/symfony/symfony/commit/50e7a38a8f088601c09669b9d267c9c0228884e1)

## Related threats

- [Symfony HtmlSanitizer UrlSanitizer host allowlist bypass](https://junglewise.ai/threats/cve-2026-118517-the-symfony-htmlsanitizer-component-urlsanitizer-parses-urls)
- [Symfony HtmlSanitizer meta refresh URL sanitization bypass](https://junglewise.ai/threats/cve-2026-121373-the-symfony-htmlsanitizer-component)
- [Symfony HtmlSanitizer XSS via incomplete URL attribute sanitization](https://junglewise.ai/threats/cve-2026-48761-symfony-htmlsanitizer-xss-via-incomplete-url-attribute)
- [Symfony HtmlSanitizer visual spoofing via percent-encoded BiDi characters](https://junglewise.ai/threats/cve-2026-48760-symfony-htmlsanitizer-visual-spoofing-via-percent-encoded-bidi)
- [Symfony HtmlSanitizer XSS via incomplete URL attribute list](https://junglewise.ai/threats/cve-2026-45753-symfony-htmlsanitizer-xss-via-incomplete-url-attribute-list)
