symfony/html-sanitizer · Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority
Affects symfony/html-sanitizerSource GCVE Database
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 | 4.3 |
- 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:L/VA:N/SC:N/SI:N/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 by upgrading to Symfony HtmlSanitizer versions 6.4.50, 7.4.23, or 8.1.11 or later. The fix enforces stricter URL parsing rules that close the bypass vectors. If upgrading is not immediately possible, disabling allowRelativeLinks (setting allowRelativeLinks(false)) mitigates the issue since the bypass requires this option to be enabled. No other generic mitigations are necessary as the vulnerability is configuration-dependent and fixed in the stated versions.
Description
Symfony's HtmlSanitizer component has a vulnerability in its URL sanitization logic that allows bypassing host allow-lists via specially crafted URLs without a well-formed authority. This occurs because the sanitizer uses RFC 3986 parsing which treats URLs like 'http:evil.example' as having no host, skipping host checks, while browsers interpret them differently, allowing navigation to untrusted hosts. The issue affects configurations that enable both host allow-lists and relative links. The vulnerability is rated medium severity with a CVSS score of 4.3 and has been fixed in Symfony versions 6.4.50, 7.4.23, and 8.1.11.
References
- github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrw (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-118517 (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-118517.yaml (opens in a new tab)
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-118517.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)
- symfony.com/cve-2026-118517 (opens in a new tab)