Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. lxml
  4. ›
  5. CVE-2021-43818

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

December 13, 2021 (updated September 30, 2024)

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.

References

  • github.com/advisories/GHSA-55x5-fj6c-h6m8
  • github.com/lxml/lxml
  • github.com/lxml/lxml/commit/12fa9669007180a7bb87d990c375cf91ca5b664a
  • github.com/lxml/lxml/commit/a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c
  • github.com/lxml/lxml/commit/f2330237440df7e8f39c3ad1b1aa8852be3b27c0
  • github.com/lxml/lxml/security/advisories/GHSA-55x5-fj6c-h6m8
  • github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2021-852.yaml
  • lists.debian.org/debian-lts-announce/2021/12/msg00037.html
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TUIS2KE3HZ2AAQKXFLTJFZPP2IFHJTC7
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/V2XMOM5PFT6U5AAXY6EFNT5JZCKKHK2V
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WZGNET2A4WGLSUXLBFYKNC5PXHQMI3I7
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZQ4SPKJX3RRJK4UWA6FXCRHD2TVRQI44
  • nvd.nist.gov/vuln/detail/CVE-2021-43818
  • security.gentoo.org/glsa/202208-06
  • security.netapp.com/advisory/ntap-20220107-0005
  • www.debian.org/security/2022/dsa-5043
  • www.oracle.com/security-alerts/cpuapr2022.html
  • www.oracle.com/security-alerts/cpujul2022.html

Code Behaviors & Features

Detect and mitigate CVE-2021-43818 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.6.5

Fixed versions

  • 4.6.5

Solution

Upgrade to version 4.6.5 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • 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')

Source file

pypi/lxml/CVE-2021-43818.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:31 +0000.