CVE-2024-34078
JSON

6.1medium

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

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.56% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-wvhx-q427-fgh3PYSEC-2026-1455

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.

Affected

Product or packageVersionsReported by
matthiask html-sanitizer< 2.4.2CVE List
html-sanitizer (PyPI)before 2.4.2GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubhigh rating

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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.

NVD (es)

html-sanitizer es un limpiador HTML basado en listas permitidas. Si usa `keep_typographic_whitespace=False` (que es el valor predeterminado), el desinfectante normaliza Unicode al formulario NFKC al final. Algunos caracteres Unicode se normalizan como galones; esto permite que el HTML especialmente manipulado escape al saneamiento. El problema se solucionó en 2.4.2.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-34078 changed 2024-08-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-wvhx-q427-fgh3 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-34078 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1455 changed 2026-07-07CC-BY-4.0