CVE-2021-43818 HIGH

CVE-2021-43818: HTML Cleaner allows crafted and SVG embedded scripts to pass through

Vendor Lxml
Product lxml
Weakness CWE-74
Published December 13, 2021
Last update December 18, 2025

CVSS base score

8.2/10
Attack vector Network
Attack complexity Low
Privileges required None
User interaction Required
Confidentiality Low
Integrity High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N

What the vulnerability does

01Description

lxml is a library for processing XML and HTML in the Python language. Prior to version 4.6.5, the HTML Cleaner in lxml.html lets certain crafted script content pass through, as well as script content in SVG files embedded using data URIs. Users that employ the HTML cleaner in a security relevant context should upgrade to lxml 4.6.5 to receive a patch. There are no known workarounds available.

Key dates

02Disclosure timeline

December 13, 2021 CVE published
December 18, 2025 Record updated