Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority (Incomplete Fix for CVE-2026-45066)
CVE-2026-118517GHSA-c76g-9c4c-gxrwPublished 5 Nov 2026, 16:26 UTC
Real-world risk
0.9/ 10Low
Routine
If the vulnerable configuration applies to you: 2.0
PreliminaryFrom the CVSS vector only · confidence low
CVSS
2.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from Checkmarx)
The Symfony HtmlSanitizer component UrlSanitizer parses URLs differently from browsers, allowing the allowLinkHosts() and allowMediaHosts() checks to be bypassed for URLs without a well-formed authority, resulting in untrusted hosts being referenced in sanitized output in Symfony versions 6.1.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. UrlSanitizer parses URLs with league/uri, which follows RFC 3986, while browsers follow the WHATWG URL standard. For URLs without a well-formed authority, such as http:evil.example, ///evil.example, or https://://evil.example/ the sanitizer finds no host, whereas browsers resolve them to evil.example. The guard added for CVE-2026-45066 missed the zero-slash form, and the host 0 was also skipped because PHP treats it as falsy. This is exploitable when a host allow-list is combined with allowRelativeLinks(true) or allowRelativeMedias(true). The default configuration is not affected.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| SymfonyWidespread | >= 6.1.0, < 6.4.50; >= 7.0.0, < 7.4.23; >= 8.0.0, < 8.1.11 | 6.4.50, 7.4.23, 8.1.11 |
| symfony/http-clientNiche | not stated | — |
What to do
Update to a fixed version: 6.4.50, 7.4.23, 8.1.11.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T3: Public proof of concept (× 0.95)
A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit
- CISA SSVC: proof of concept
EPSS 0.3% chance of exploitation in 30 days (percentile 19), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T3: Public proof of concept0.950
- 10 × impact 0.3 × prerequisites 0.315 × threat 0.950.898
- Rounded to one decimal between 0.1 and 100.9
Exploitation and evidence timeline
- 5 Nov 2026 Published
- 2 Dec 2026 CISA SSVC: proof of concept first seen
- 2 Dec 2026 Risk 0.9 (cvss fallback)
Weakness
CWE-184, CWE-436
References
- https://github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrwthird-party-advisory
- https://github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43patch
- https://nvd.nist.gov/vuln/detail/CVE-2026-118517
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-118517.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-118517.yaml
- https://github.com/symfony/symfony/releases/tag/v6.4.50
- https://github.com/symfony/symfony/releases/tag/v7.4.23
- https://github.com/symfony/symfony/releases/tag/v8.1.11
- https://symfony.com/cve-2026-118517
- https://github.com/advisories/GHSA-c76g-9c4c-gxrw
- CVE-2026-118517 on CVE.org