ADVISORIES

Vulnerability

CVE-2021-43818

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.

38 advisories report this vulnerability, across 13 ecosystems.

Advisories in PyPI

  • GHSA-55x5-fj6c-h6m8

    lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through

    Moderate CVE-2021-43818 PyPI Updated 8 July 2026
  • PYSEC-2021-852

    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…

    CVE-2021-43818 PyPI Updated 9 April 2026

References