---
id: CVE-2026-118517
title: >-
  Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs
  Without a Well-Formed Authority (Incomplete Fix for CVE-2026-45066)
summary: "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 bein…"
severity: low
cvss: 2.3
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-184
  - CWE-436
vendor: sensiolabs
product: symfony/http-client
affected:
  - symfony/http-client >= 6.1.0 < 6.4.50
  - symfony/http-client >= 7.0.0 < 7.4.23
  - symfony/http-client >= 8.0.0 < 8.1.11
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-11-05T16:49:56.410466Z'
exploitAvailable: true
published: '2026-11-05'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T16:52:28.063Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-118517'
references:
  - url: 'https://github.com/symfony/symfony/security/advisories/GHSA-c76g-9c4c-gxrw'
  - url: >-
      https://github.com/symfony/symfony/commit/f2f47d2eef6c2552c6c5c24953caa94f7901cb43
tags:
  - cve.org
  - exploit-available
ingestedAt: '2026-11-05T22:38:31.412Z'
---

## Overview

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.

## Affected

- `symfony/http-client >= 6.1.0 < 6.4.50`
- `symfony/http-client >= 7.0.0 < 7.4.23`
- `symfony/http-client >= 8.0.0 < 8.1.11`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
