CVE-2021-43818

HTML Cleaner allows crafted and SVG embedded scripts to pass through

State
Published
Severity
8.2 High
Published
Dec 13, 2021
Updated
Dec 18, 2025
Reserved
Nov 16, 2021

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.18.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:NGitHub_M

Weaknesses

  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

ProductVersions
lxmllxml
  • < 4.6.5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.