Skip to content
OpenAdvisories
Low · 2.3 CVE-2026-118517 EUVD-2026-117579

Symfony: HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URLs Without a Well-Formed Authority (Incomplete Fix for CVE-2026-45066)

Published Nov 5, 2026 · Updated Nov 5, 2026 · Assigned by Checkmarx

Description

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 products

VendorProductAffectedFixed
sensiolabs symfony — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 symfony 7.4.23+dfsg-1 —
Debian 13 symfony 6.4.50+dfsg-0+deb13u1 —
Debian 12 symfony No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 symfony No fix yet —
Ubuntu 26.04 LTS symfony No fix yet —
Ubuntu 16.04 LTS symfony No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS symfony No fix yet —
Ubuntu Pro 22.04 LTS symfony No fix yet —
Ubuntu Pro 20.04 LTS symfony No fix yet —
Ubuntu Pro 18.04 LTS symfony No fix yet —

References