CVE-2026-45066
Published:May 31, 2026
Updated:June 13, 2026
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" schemes; so an input like "https://evil@trusted.com/" parses with host "trusted.com" server-side but navigates to "https://evil/" in the browser. Second, WHATWG collapses any run of "/" after the scheme into "//", while RFC-3986 does not; so "https:/evil.com/" and "https:///evil.com/" parse as host-less (skipping the host allowlist) but resolve to "evil.com" in the browser. Third, "UrlAttributeSanitizer" checks "'a' === $element" to route to the link policy and falls through to the media policy otherwise, but "<area>" is a navigable hyperlink equivalent to "<a>"; so "<area href>" was sanitised against the media policy (which typically allows "data:" and may have no host allowlist), bypassing "allowLinkHosts()" / "allowLinkSchemes()" entirely. Resolution "UrlSanitizer::sanitize()" now rejects URLs that contain a backslash or that use a special scheme ("http", "https", "ftp", "ws", "wss") followed by a single slash or three slashes before parsing, eliminating the parser-differential bypasses. "UrlAttributeSanitizer" now applies the link policy to both "<a>" and "<area>" elements. The patch for this issue is available "here" (https://github.com/symfony/symfony/commit/d506b556d3d3906f3e8660ad82257ce87edbaac4) for branch 5.4. Credits Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.
Affected Packages
https://github.com/symfony/symfony.git (GITHUB):
Affected version(s) >=v2.0.0BETA1 <v5.4.52Fix Suggestion:
Update to version v5.4.52https://github.com/symfony/symfony.git (GITHUB):
Affected version(s) >=v7.4.0 <v7.4.9Fix Suggestion:
Update to version v7.4.9https://github.com/symfony/symfony.git (GITHUB):
Affected version(s) >=v6.4.0 <v6.4.38Fix Suggestion:
Update to version v6.4.38https://github.com/symfony/symfony.git (GITHUB):
Affected version(s) >=v8.0.0 <v8.0.9Fix Suggestion:
Update to version v8.0.9symfony/symfony (PHP):
Affected version(s) >=v6.1.0 <v6.4.40Fix Suggestion:
Update to version v6.4.40symfony/html-sanitizer (PHP):
Affected version(s) >=v8.0.0 <v8.0.12Fix Suggestion:
Update to version v8.0.12symfony/symfony (PHP):
Affected version(s) >=v8.0.0 <v8.0.12Fix Suggestion:
Update to version v8.0.12symfony/html-sanitizer (PHP):
Affected version(s) >=v6.1.0 <v6.4.40Fix Suggestion:
Update to version v6.4.40symfony/html-sanitizer (PHP):
Affected version(s) >=v7.0.0 <v7.4.12Fix Suggestion:
Update to version v7.4.12symfony/symfony (PHP):
Affected version(s) >=v7.0.0 <v7.4.12Fix Suggestion:
Update to version v7.4.12Related Resources (5)
Do you need more information?
Contact UsCVSS v4
Base Score:
5.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
LOW
Vulnerable System Availability
NONE
Subsequent System Confidentiality
LOW
Subsequent System Integrity
LOW
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.1
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
EPSS
Base Score:
0.05