CVE-2021-43818

HTML Cleaner allows crafted and SVG embedded scripts to pass through

Published Dec 13, 2021 CVSS 3.1 · 8.2 High EPSS 2.7% KEV · Not listed
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.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2871-1 lxml security update
Debian DSA Debian DSA DSA-5043-1 lxml security update
EUVD EUVD EUVD-2021-0117 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.
Github GHSA Github GHSA GHSA-55x5-fj6c-h6m8 lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through
Ubuntu USN Ubuntu USN USN-5225-1 lxml vulnerability
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-77

    Improper Neutralization of Special Elements used in a Command ('Command Injection')

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 18, 2025, 3:05 PM
Reserved
Nov 16, 2021, 12:00 AM
Status
Modified
Published
Dec 13, 2021, 6:15 PM
Modified
Jun 17, 2026, 4:11 AM
Severity
Moderate
Public date
Dec 12, 2021, 12:00 AM