CVE-2024-34078: Python html sanitizer · html-sanitizer is an allowlist-based HTML cleaner
Affects python-html-sanitizerSource GCVE Database
Not known to be exploited · CVSS 6.1 Medium · fixed in 2.4.2 : update python-html-sanitizer when convenient.
Data as of 24 Nov 2026, 19:26 UTC
- Patch
- Available – fixed in 2.4.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 6 May 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSpython-html-sanitizerpkg:deb/ubuntu/python-html-sanitizer?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSpython-html-sanitizerpkg:deb/ubuntu/python-html-sanitizer?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
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.
References
- ubuntu.com/security/CVE-2024-34078 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-34078 (opens in a new tab)
- github.com/matthiask/html-sanitizer/security/advisories/GHSA-wvhx-q427-fgh3 (opens in a new tab)
- github.com/matthiask/html-sanitizer/commit/48db42fc5143d0140c32d929c46b802f96913550 (opens in a new tab)