CVE-2026-118517
LOW 2.3CVSS 4.0Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority: Incomplete Fix for CVE-2026-45066
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.
- Published
- 5 Nov 2026
- Last modified
- 1 Dec 2026
- Assigned by
- 596c5446-0ce5-4ba2-aa66-48b3b757a647
- NVD status
- Awaiting Analysis
- Weakness
- CWE-184CWE-436
- Also known as
- GHSA-c76g-9c4c-gxrw
- Sources
- NVDJSONOSV GHSA-c76g-9c4c-gxrwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 596c5446-0ce5-4ba2-aa66-48b3b757a647 (Secondary) | CVSS 4.0 | LOW 2.3 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N | |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Packagist | symfony/html-sanitizer | >= 6.1.0, < 6.4.50 | 6.4.50 |
| OSV | Packagist | symfony/html-sanitizer | >= 7.0.0, < 7.4.23 | 7.4.23 |
| OSV | Packagist | symfony/html-sanitizer | >= 8.0.0, < 8.1.11 | 8.1.11 |
| OSV | Packagist | symfony/symfony | >= 6.1.0, < 6.4.50 | 6.4.50 |
| OSV | Packagist | symfony/symfony | >= 7.0.0, < 7.4.23 | 7.4.23 |
| OSV | Packagist | symfony/symfony | >= 8.0.0, < 8.1.11 | 8.1.11 |
References
- https://github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43 · WEB
- https://github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrw · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-118517 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-118517.yaml · WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-118517.yaml · WEB
- https://github.com/symfony/symfony · PACKAGE
- https://github.com/symfony/symfony/releases/tag/v6.4.50 · WEB
- https://github.com/symfony/symfony/releases/tag/v7.4.23 · WEB
- https://github.com/symfony/symfony/releases/tag/v8.1.11 · WEB
- https://symfony.com/cve-2026-118517 · WEB
History
- 1 Dec 2026 22:45 UTC · OSV: first stored (published 1 Dec 2026)
- 25 Nov 2026 21:23 UTC · NVD: first stored (published 5 Nov 2026)