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 package | Versions | Reported by |
|---|---|---|
| matthiask html-sanitizer | < 2.4.2 | CVE List |
| html-sanitizer (PyPI) | before 2.4.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | high rating |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-34078 changed 2024-08-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wvhx-q427-fgh3 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-34078 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1455 changed 2026-07-07 | CC-BY-4.0 |