Symfony's HtmlSanitizer can keep links and media URLs that point to hosts you didn't allow. An attacker who can submit HTML to your app could get a link to their own site past your host allow-list.
This is an incomplete fix for CVE-2026-45066. The sanitizer and browsers read some URL spellings differently: the sanitizer sees no host and keeps the URL, while the browser finds a host and goes to it. See the Symfony advisory and the fix.
Who is affected
Your app is exposed if it sanitizes untrusted HTML with symfony/html-sanitizer and its HtmlSanitizerConfig combines either of these:
allowLinkHosts()withallowRelativeLinks(true)allowMediaHosts()withallowRelativeMedias(true)
The default configuration is not affected. With relative links and relative media turned off, which is the default, every form of the bypass is blocked. Symfony rates the issue low for that reason.
What to do
Update symfony/html-sanitizer (or symfony/symfony) to 6.4.50, 7.4.23 or 8.1.11, depending on your branch. Symfony's advisory notes that turning off allowRelativeLinks() and allowRelativeMedias() removes every form of the bypass, if you can live without relative URLs until you update.
One behaviour change: a bare https://, or any URL with an empty host part, is now dropped where it used to be kept under allowRelativeLinks(true).
Reported by Ilia Alshanetsky.