medium6.1
CVE-2026-45066
Symfony has an HtmlSanitizer allowLinkHosts() / allowMediaHosts() Bypass via URL-Parser Differentials and <area> Misclassification
Impact
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, HtmlSanitizer URL sanitization can allow off-allowlist URLs through allowLinkHosts() or allowMediaHosts() because UrlSanitizer::parse() follows RFC 3986 while browsers follow WHATWG URL parsing, and because <area href> is checked against the media policy rather than the link policy. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| composer | symfony/html-sanitizer | >= 6.1.0, < 6.4.40 | 6.4.40 |
| composer | symfony/symfony | >= 6.1.0, < 6.4.40 | 6.4.40 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Sensiolabs | Symfony | from 6.1.0 before 6.4.40 from 7.0.0 before 7.4.12 from 8.0.0 before 8.0.12 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-qc95-4862-92fh
- 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://symfony.com/cve-2026-45066
- https://github.com/symfony/symfony/commit/d506b556d3d3906f3e8660ad82257ce87edbaac4
- https://github.com/symfony/symfony/releases/tag/v6.4.40
- https://github.com/symfony/symfony/releases/tag/v7.4.12
- https://github.com/symfony/symfony/releases/tag/v8.0.12