MediumGHSA-qc95-4862-92fh::1
Symfony has an HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URL-Parser Differentials and <area> Misclassification
Affected versions
6.1.0 to before 6.4.40, 7.0.0 to before 7.4.12, 8.0.0 to before 8.0.12 - fixed in 6.4.40Details
### Description `symfony/html-sanitizer` lets applications sanitise untrusted HTML. The configuration methods `allowLinkHosts([...])` and `allowLinkSchemes([...])` are intended to restrict `<a href>` targets to an allowlist of hosts/schemes; `allowMediaHosts()` / `allowMediaSchemes()` do the same for `<img src>` etc. Three distinct bypasses allow a content author to smuggle off-allowlist URLs past these checks. First, `UrlSanitizer::parse()` parses the input following RFC-3986, while browsers follow the WHATWG URL Standard which normalises `\` to `/` before parsing the authority of "special"
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-45066
- https://github.com/symfony/symfony/security/advisories/GHSA-qc95-4862-92fh
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-45066.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45066.yaml
- https://github.com/symfony/symfony
- https://symfony.com/cve-2026-45066
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected