html-sanitizer
Affected
- introduced
0, fixed2.4.2(ecosystem)
Fixed versions
2.4.2
Fix
- Fixed version
2.4.2pip install --upgrade html-sanitizer==2.4.2
Advisory
Also known as: CVE-2024-34078, PYSEC-2026-1455
Arbitrary HTML present after sanitization because of unicode normalization
Impact
If using keep_typographic_whitespace=False (which is the default), the sanitizer normalizes unicode to the NFKC form at the end. Some unicode characters normalize to chevrons; this allows specially crafted HTML to escape sanitization.
Patches
The problem has been fixed in 2.4.2.
Workarounds
Set keep_typographic_whitespace=True explicitly, or normalize to NFKC yourself earlier.
High Basis: The source's own band: HIGH
0, fixed 2.4.2 (ecosystem)2.4.2
2.4.2pip install --upgrade html-sanitizer==2.4.2Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0