GHSA-8rfp-98v4-mmr6Low· 0.0▾ SunlitBleach: URI sanitization allows disallowed URI schemes with Unicode > U+00A0 in output
▾ Sunlit zone — Low / medium · no exploitation signal
impact 13.8 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0 → —
— → 0
0 → —
— → 0
0 → —
— → 0
0 → —
— → 0
0 → —
— → 0
0 → —
— → 0
A possible XSS bypass affects users calling bleach.clean with all of:
a in the allowed tagshref in allowed attributesThe bleach.clean sanitizer outputs URIs containing disallowed scheme patterns that it should be stripping. However, because the inserted Unicode characters make the scheme invalid per RFC 3986, modern browsers do not execute these as javascript: URIs. The practical security impact is limited to:
This is not a direct XSS vulnerability.
Python code example from reporter with Bleach v6.3.0 and Python 3.13:
import bleach
payload1 = '<a href="javascript\u200b:alert(document.cookie)">Click me</a>'
result1 = bleach.clean(payload1)
print(f"(ZWSP): {repr(result1)}")
Output:
(ZWSP): '<a href="javascript\u200b:alert(document.cookie)">Click me</a>'
Users should upgrade to Bleach 6.4.0.
Pre-process content removing non-ASCII characters from URI schemes before sanitizing with bleach.clean.
A strong Content-Security-Policy without unsafe-inline and unsafe-eval script-srcs will also help mitigate the risk.
Reported by codeant from CodeAnt AI.
bleach < 6.4.0Upgrade to a patched release:
bleach 6.4.0Field changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2020-6817High· 7.5regular expression denial-of-service (ReDoS) in Bleach
CVE-2021-23980Medium· 6.1Cross-site scripting in Bleach
CVE-2020-6802Medium· 6.1XSS in Bleach when noscript and raw tag whitelisted
CVE-2020-6816Medium· 6.1Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag
GHSA-gj48-438w-jh9vMedium· 6.1Bleach clean() / Cleaner() fails to sanitize dangerous URI schemes in allowed formaction attributes
GHSA-g75f-g53v-794xMedium· 4.3Bleach linkify(parse_email=True) CPU exhaustion via unbounded email regex scanning