All reports
High

Arbitrary HTML present after sanitization because of unicode normalization

Affected versions

Version ranges need review.

Affected versions
<2.4.2
Fixed version
2.4.2
Affected versions
< 2.4.2
Fixed version
2.4.2

Exploitation

CVE-2024-34078

Probability of exploitation in the next 30 days: 0.56%

FIRST EPSS · 2026-11-19

Description

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.

Links

Credits

  • yzueger