CVE-2021-43818 json
HTML Cleaner allows crafted and SVG embedded scripts to pass through
published 2021-12-13 4 y ago modified 2026-07-08 4 mo ago also GHSA-55x5-fj6c-h6m8 , PYSEC-2021-852 , EUVD-2021-0117
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.6%
- EPSS 2.6% chance of exploitation in 30 days, percentile 85%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi lxml 4.6.5
- lxml lxml 4.6.5
- lxml Debian 14, Debian 13, Debian 12 4.7.1-1
debian advisories DEBIAN-CVE-2021-43818
- lxml Ubuntu 18.04 LTS 4.2.1-1ubuntu0.6
- lxml Ubuntu 20.04 LTS 4.5.0-1ubuntu0.5
- lxml Ubuntu 22.04 LTS 4.7.1-1
- lxml Ubuntu Pro 14.04 LTS 3.3.3-1ubuntu0.2+esm5
- lxml Ubuntu Pro 16.04 LTS 3.5.0-1ubuntu0.4+esm2
ubuntu advisories UBUNTU-CVE-2021-43818
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- foreman satellite utils 6.11, satellite capsule 6.11, satellite 6.11 3.1.1.21-2.el7sat
- foreman satellite utils 6.11, satellite capsule 6.11, satellite 6.11 3.1.1.21-2.el8sat
- libsolv satellite capsule 6.11, satellite 6.11 0.7.22-1.el7pc
- libsolv satellite capsule 6.11, satellite 6.11 0.7.22-1.el8pc
- candlepin satellite 6.11 4.1.13-1.el7sat
- candlepin satellite 6.11 4.1.13-1.el8sat
- satellite satellite utils 6.11, satellite capsule 6.11, satellite 6.11 6.11.0-2.el7sat
- satellite satellite utils 6.11, satellite capsule 6.11, satellite 6.11 6.11.0-2.el8sat
red hat advisories RHSA-2022:5498RHSA-2022:1932RHSA-2022:1821RHSA-2022:1664RHSA-2022:1764RHSA-2022:1763
- grafana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 6.7.4-3.26.1
- python-lxml OpenStack Cloud Crowbar 9, OpenStack Cloud 9 4.2.4-3.3.1
- python-Pillow OpenStack Cloud Crowbar 9, OpenStack Cloud 9 5.2.0-3.17.1
- ardana-barbican OpenStack Cloud 9 9.0+git.1644879908.8a641c1-3.13.1
- rubygem-sinatra OpenStack Cloud Crowbar 9 1.4.6-4.3.1
- openstack-cinder OpenStack Cloud Crowbar 9, OpenStack Cloud 9 13.0.10~dev24-3.34.2
- openstack-ironic OpenStack Cloud Crowbar 9, OpenStack Cloud 9 11.1.5~dev18-3.28.2
- openstack-neutron OpenStack Cloud Crowbar 9, OpenStack Cloud 9 13.0.8~dev206-3.40.1
suse advisories SUSE-SU-2022:1729-1SUSE-SU-2022:0895-1SUSE-SU-2022:0803-1
- python-lxml openSUSE Leap 15.3 4.7.1-3.7.1
opensuse advisories openSUSE-SU-2022:0803-1
- python3-lxml AlmaLinux 8 4.2.3-4.el8
- babel AlmaLinux 8 2.5.1-10.module_el8.6.0+2781+fed64c13
- python2 AlmaLinux 8 2.7.18-10.module_el8.6.0+2781+fed64c13.alma
- python2-py AlmaLinux 8 1.5.3-6.module_el8.6.0+2781+fed64c13
- python2-dns AlmaLinux 8 1.15.0-10.module_el8.6.0+2781+fed64c13
- python2-pip AlmaLinux 8 9.0.3-19.module_el8.6.0+2781+fed64c13
- python2-six AlmaLinux 8 1.11.0-6.module_el8.6.0+2781+fed64c13
- python2-bson AlmaLinux 8 3.7.0-1.module_el8.6.0+2781+fed64c13
almalinux advisories ALSA-2022:1932ALSA-2022:1821ALSA-2022:1763ALSA-2022:1764
- libdb Rocky Linux 8 5.3.28-42.el8_4
- python-lxml Rocky Linux 8 4.2.3-4.el8
- python-lxml Rocky Linux 8 4.2.3-4.module+el8.4.0+403+9ae17a31
- pytz Rocky Linux 8 2017.2-12.module+el8.5.0+706+735ec4b3
- pytz Rocky Linux 8 2017.2-12.module+el8.4.0+403+9ae17a31
- babel Rocky Linux 8 2.5.1-10.module+el8.5.0+706+735ec4b3
- numpy Rocky Linux 8 1:1.14.2-16.module+el8.5.0+706+735ec4b3
- numpy Rocky Linux 8 1:1.14.2-16.module+el8.4.0+403+9ae17a31
rocky linux advisories RLSA-2022:5498RLSA-2022:1932RLSA-2022:1821RLSA-2022:1763RLSA-2022:1764
- py3-lxml Alpine 3.24, Alpine 3.23, Alpine 3.22 +7 more 4.6.5-r0
alpine advisories ALPINE-CVE-2021-43818
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-lxml CBL-Mariner 2.0 4.8.0-1
azure linux advisories AZL-7025
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- python-lxml Arch Linux 4.6.5-1
arch linux advisories AVG-2629
- github.com/lxml/lxml@12fa966 commit
- github.com/lxml/lxml@a3eacbc commit
- github.com/lxml/lxml@f233023 commit
- oracle.com/security-alerts/cpuapr2022.html advisory
- oracle.com/security-alerts/cpujul2022.html advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-43818 updated cvss 8.8
python-lxml: HTML Cleaner allows crafted and SVG embedded scripts to pass through
-
Red Hat Ansible Automation Platform 1.2 lxml Red Hat Ansible Automation Platform 2 lxml Red Hat Ansible Tower 3 lxmlaffected: workaround, no fix available
-
Red Hat Enterprise Linux 6 python-lxml Red Hat Enterprise Linux 7 python-lxml Red Hat OpenStack Platform 13 (Queens) python-lxmlaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Update Infrastructure 3 for Cloud Providers python-lxmlaffected: workaround, no fix available
-
Red Hat Enterprise Linux AppStream (v. 8) python-lxml 4.2.3-4.el8, python3-lxml 4.2.3-4.el8, pytz 2019.3-3.module+el8.4.0+8888+89bc7e79, scipy 1.3.1-4.module+el8.4.0+8888+89bc7e79, scipy 1.5.4-3.module+el8.4.0+9822+20bf1249, pytz 2017.2-12.module+el8.1.0+3111+de3f2d8e, +205 morefixed: vendor fix RHSA-2022:1821
-
Red Hat Satellite 6.11 for RHEL 8 python-lxml 4.7.1-1.el8pcfixed: vendor fix RHSA-2022:5498
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-python38-python-lxml 4.4.1-8.el7 Red Hat Software Collections for RHEL(v. 7) rh-python38-python-lxml 4.4.1-8.el7fixed: vendor fix RHSA-2022:1664
-
Red Hat Enterprise Linux 8 python-lxml, python3-lxml Red Hat Enterprise Linux 9 python-lxml, python3-lxml Red Hat Enterprise Linux CRB (v. 8) pytest 4.6.6-3.module+el8.4.0+8888+89bc7e79, pytest 6.0.2-2.module+el8.4.0+9822+20bf1249, Cython 0.29.21-5.module+el8.4.0+9822+20bf1249, pybind11 2.7.1-1.module+el8.6.0+12838+640e6226, python-py 1.8.0-8.module+el8.4.0+8888+89bc7e79, python-py 1.10.0-1.module+el8.4.0+9822+20bf1249, +34 more Red Hat Satellite 6.11 for RHEL 7 tfm 7.0-1.el7sat, gofer 2.12.5-7.el7sat, katello 4.3.0-3.el7sat, libsolv 0.7.22-1.el7pc, libcomps 0.1.18-1.el7pc, libsolv0 0.6.34-4.el7sat, +638 more Red Hat Satellite 6.11 for RHEL 8 libdb 5.3.28-42.el8_4, katello 4.3.0-3.el8sat, libsolv 0.7.22-1.el8pc, libcomps 0.1.18-1.el8pc, python-idna 3.3-1.el8pc, python-pbr 5.6.0-1.el8pc, +628 more Red Hat Software Collections for RHEL Workstation(v. 7) rh-python38-python 3.8.13-1.el7, rh-python38-python-pip 19.3.1-3.el7, rh-python38-python-idle 3.8.13-1.el7, rh-python38-python-libs 3.8.13-1.el7, rh-python38-python-test 3.8.13-1.el7, rh-python38-python-tkinter 3.8.13-1.el7, +3 morenot affected: vulnerable code not present
+1 more productsfewer
Red Hat Software Collections for RHEL(v. 7) rh-python38-python 3.8.13-1.el7, rh-python38-python-pip 19.3.1-3.el7, rh-python38-python-idle 3.8.13-1.el7, rh-python38-python-libs 3.8.13-1.el7, rh-python38-python-test 3.8.13-1.el7, rh-python38-python-tkinter 3.8.13-1.el7, +3 more
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 10 mo ago
Exploit prediction
2.64% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N |
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | lxml | <4.6.5 |
4.6.5 |
Affected products
- lxml lxml
Classification
References
-
github.com
/lxml/lxml/commit/12fa9669007180a7bb87d990c375cf91ca5b664a
web, patch, third-party-advisory
-
github.com
/lxml/lxml/commit/a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c#diff-59130575b4fb2932c957db2922977d7d89afb0b2085357
web, patch, third-party-advisory
-
github.com
/lxml/lxml/commit/f2330237440df7e8f39c3ad1b1aa8852be3b27c0
web, patch, third-party-advisory
-
oracle.com
/security-alerts/cpuapr2022.html
web, patch, third-party-advisory
-
oracle.com
/security-alerts/cpujul2022.html
web, patch, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ZQ4SPKJX3RRJK4UWA6FXCRHD2TVRQI44/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/WZGNET2A4WGLSUXLBFYKNC5PXHQMI3I7/
vendor-advisory
-
debian.org
/security/2022/dsa-5043
vendor-advisory, web, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/TUIS2KE3HZ2AAQKXFLTJFZPP2IFHJTC7/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/V2XMOM5PFT6U5AAXY6EFNT5JZCKKHK2V/
vendor-advisory
-
security.gentoo.org
/glsa/202208-06
vendor-advisory, web, third-party-advisory
-
github.com
/lxml/lxml/security/advisories/GHSA-55x5-fj6c-h6m8
web, third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2021/12/msg00037.html
mailing-list, web, third-party-advisory
-
security.netapp.com
/advisory/ntap-20220107-0005/
third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-43818
advisory
-
security.netapp.com
/advisory/ntap-20220107-0005
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/ZQ4SPKJX3RRJK4UWA6FXCRHD2TVRQI44
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/WZGNET2A4WGLSUXLBFYKNC5PXHQMI3I7
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/V2XMOM5PFT6U5AAXY6EFNT5JZCKKHK2V
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/TUIS2KE3HZ2AAQKXFLTJFZPP2IFHJTC7
web
-
github.com
/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2021-852.yaml
web
-
github.com
/lxml/lxml
package
Sources
- CVE List CVE-2021-43818
- GitHub Advisory GHSA-55x5-fj6c-h6m8
- NVD CVE-2021-43818
- OSV PYSEC-2021-852
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.