html-sanitizer allows arbitrary HTML present after sanitization because of unicode normalization
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
html-sanitizer is an allowlist-based HTML cleaner. 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. The problem has been fixed in 2.4.2.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| matthiask | html-sanitizer | before 2.4.2 | 2.4.2 | Patch available | CNA |
| — | html-sanitizer (PyPI) | before 2.4.2 | 2.4.2 | Patch available | GHSA-wvhx-q427-fgh3 |
- html-sanitizer Vendormatthiask Affected before 2.4.2 Fixed in 2.4.2 Patch available CNA
- html-sanitizer (PyPI) Vendor— Affected before 2.4.2 Fixed in 2.4.2 Patch available GHSA-wvhx-q427-fgh3
Remediation
- Fix · CNA html-sanitizer (matthiask) Fixed in 2.4.2
- Fix · GHSA-wvhx-q427-fgh3 html-sanitizer (PyPI) Fixed in 2.4.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-34078
- 2026-10-03 Alias added: GHSA-wvhx-q427-fgh3
References
Sources
- CVE-2024-34078 · CVE Program
- CVE-2024-34078 · NVD
- FIRST EPSS
- GHSA-wvhx-q427-fgh3 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences