CVE-2021-43818
Python vulnerability analysis and mitigation

Overview

CVE-2021-43818 affects lxml, a Python library for processing XML and HTML. Prior to version 4.6.5, the HTML Cleaner in lxml.html contained a vulnerability that allows certain crafted script content to pass through, as well as script content in SVG files embedded using data URIs. The vulnerability was discovered in November 2021 and publicly disclosed on December 12, 2021 (GitHub Advisory).

Technical details

The vulnerability stems from two main issues in the HTML Cleaner component: improper sanitization of inline style attributes and inadequate filtering of data URL images. The HTML Cleaner failed to properly sanitize data URLs and style attributes, allowing potential bypass of security controls. The vulnerability received a CVSS v3.1 base score of 7.1 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L (NVD).

Impact

Successful exploitation of this vulnerability could lead to Cross-Site Scripting (XSS) attacks, potentially resulting in the disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The vulnerability affects applications that employ the HTML cleaner in security-relevant contexts (NetApp Advisory).

Mitigation and workarounds

The vulnerability was patched in lxml version 4.6.5. Users should upgrade to this version or later to receive the fix. There are no known workarounds available. The fix includes improvements to the sanitization of style attributes and proper handling of SVG image data URLs (GitHub Advisory).

Community reactions

Multiple vendors and distributions responded to this vulnerability by releasing security advisories and patches, including Debian, Fedora, Oracle, and NetApp. Debian released security updates for multiple versions of their distribution (Debian Advisory), while Fedora provided fixes for both their main Python package and MinGW builds (Fedora Update).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management