symfony/html-sanitizer · Symfony: HtmlSanitizer Does Not URL-Sanitize srcset and imagesrcset Leading to Media Scheme and Host Allow-List Bypass
Affects symfony/html-sanitizerSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 2.3 Low : upgrade to 6.4.50 when convenient.
Data as of 1 Dec 2026, 23:01 UTC
Contested
Scorers differ by 2 or more points| CNA (Checkmarx) | CVSS 4.0 | 2.3 |
|---|---|---|
| CISA-ADP | CVSS 3.1 | 5.4 |
- Patch
- Available – fixed in 6.4.50, 7.4.23, 8.1.11
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 5 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Dec 2026.
What to do
Upgrade symfony/html-sanitizer and symfony/symfony to 6.4.50; symfony/html-sanitizer and symfony/symfony to 7.4.23; symfony/html-sanitizer and symfony/symfony to 8.1.11.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistsymfony/html-sanitizer | Affected
| Fixed in
|
| Packagistsymfony/html-sanitizer | Affected
| Fixed in
|
| Packagistsymfony/html-sanitizer | Affected
| Fixed in
|
| Packagistsymfony/symfony | Affected
| Fixed in
|
| Packagistsymfony/symfony | Affected
| Fixed in
|
| Packagistsymfony/symfony | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and should be applied. Symfony fixed this issue in versions 6.4.50, 7.4.23, and 8.1.11 by adding proper sanitization for 'srcset' and 'imagesrcset' attributes. The fix requires also applying the patch for CVE-2026-118517 to ensure correct URL host allow-list enforcement. Until patched, applications should avoid allowing these attributes in sanitizer configurations that rely on media host or scheme restrictions. No other mitigation is indicated by the vendor advisory.
Description
Symfony's HtmlSanitizer component did not sanitize the 'srcset' and 'imagesrcset' attributes, allowing attacker-controlled responsive-image URL lists to bypass media scheme and host allow-lists. This issue arises because these attributes were allowed but lacked a registered URL sanitizer, causing their values to be preserved verbatim. The vulnerability affects configurations that rely on allowMediaHosts or allowMediaSchemes to restrict media URLs. The issue is fixed in versions 6.4.50, 7.4.23, and 8.1.11 by properly parsing and sanitizing each URL candidate in these attributes. The severity is rated medium with a CVSS score of 5.4.
References
- github.com/symfony/symfony/security/advisories/GHSA-q8jq-xrf4-v5j8 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-121949 (opens in a new tab)
- github.com/symfony/symfony/commit/50e7a38a8f088601c09669b9d267c9c0228884e1 (opens in a new tab)
- github.com/symfony/symfony/commit/9da387d0ddbf506eebd5d9e928bfd4f8f455d8b9 (opens in a new tab)
- github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43 (opens in a new tab)
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-121949.yaml (opens in a new tab)
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-121949.yaml (opens in a new tab)
- github.com/symfony/symfony (opens in a new tab)
- github.com/symfony/symfony/releases/tag/v6.4.50 (opens in a new tab)
- github.com/symfony/symfony/releases/tag/v7.4.23 (opens in a new tab)
- github.com/symfony/symfony/releases/tag/v8.1.11 (opens in a new tab)