Skip to content
OpenAdvisories
Medium · 6.1 CVE-2024-34078 EUVD-2024-1840GHSA-wvhx-q427-fgh3PYSEC-2026-1455

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

Published May 6, 2024 · Updated Aug 26, 2024 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
matthiask html-sanitizer < 2.4.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 python-html-sanitizer 1.9.1-2+deb11u1 DLA-3856-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS python-html-sanitizer No fix yet —
Ubuntu 22.04 LTS python-html-sanitizer No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI html-sanitizer < 2.4.2 2.4.2 GHSA-wvhx-q427-fgh3

Advisories 1

References