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

CVE-2021-43818 · Severity: low · CVSS 3.1 · Published 2021-12-13

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.

Technologies: lxml (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2021-43818 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-43818 being exploited in the wild.
How severe is CVE-2021-43818?
Low severity, with a CVSS score of 3.1, published 13 December 2021.
Which products and versions are affected?
lxml (PyPI) ECOSYSTEM:introduced=0,fixed=4.6.5, GIT:introduced=0,fixed=f2330237440df7e8f39c3ad1b1aa8852be3b27c0,fixed=12fa9669007180a7bb87d990c375cf91ca5b664a|GIT:introduced=0,fixed=a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c|ECOSYSTEM:introduced=0,fixed=4.6.5.
Is there a fix for CVE-2021-43818?
Yes. lxml (PyPI): upgrade to 4.6.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2021-43818?
Check whether you run lxml (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • lxml (PyPI): upgrade to 4.6.5 or later
    pip install "lxml>=4.6.5"

Affected products

  • lxml (PyPI) ECOSYSTEM:introduced=0,fixed=4.6.5, GIT:introduced=0,fixed=f2330237440df7e8f39c3ad1b1aa8852be3b27c0,fixed=12fa9669007180a7bb87d990c375cf91ca5b664a|GIT:introduced=0,fixed=a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c|ECOSYSTEM:introduced=0,fixed=4.6.5

Identifiers

  • CVE-2021-43818
  • GHSA-55x5-fj6c-h6m8
  • PYSEC-2021-852

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.