Skip to content
Fencer Vulns
medium 6.1

CVE-2024-34078 json

html-sanitizer allows arbitrary HTML present after sanitization because of unicode normalization

published 2024-05-06 2 y ago modified 2026-09-10 1 mo ago also GHSA-wvhx-q427-fgh3 , PYSEC-2026-1455 , EUVD-2024-1840

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 46%
public exploits
0
none known

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.

Patch / fix

  • pypi html-sanitizer 2.4.2
  • python-html-sanitizer Debian 11 1.9.1-2+deb11u1

debian advisories DEBIAN-CVE-2024-34078

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.56% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
pypi html-sanitizer
<2.4.2
2.4.2

Affected products

  • matthiask html-sanitizer

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.