CVE-2021-43818 | HTML Cleaner allows crafted and SVG embedded scripts to pass through

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.

Published: 2021-12-13 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-43818 is rated High Risk (65.7/100): CVSS High severity, with high exploitation likelihood (EPSS 5.43%, 90th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. EPSS rose +1.36% over the last day, indicating growing attacker interest. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-43818

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-19 4.07% 5.43% +1.36%
2 2026-03-21 5.43% 4.07% -1.36%
3 2026-03-05 5.43%

Full EPSS history (41 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-43818

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.2 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 4.7 [email protected]
7.1 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
2.8 3.7 [email protected]
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2021-43818

GitHub Security Advisory for CVE-2021-43818

GHSA-55x5-fj6c-h6m8 · Severity: medium · Ecosystem: pip — lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through

OS Trackers for CVE-2021-43818

vendor priority summary link
alpine high CVE-2021-43818: 1 source package rows (py3-lxml); 8 state rows across 8 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-community, edge-main); fixed 8, open 0. https://security.alpinelinux.org/vuln/CVE-2021-43818
debian not yet assigned CVE-2021-43818 not yet assigned priority: Debian including 1 source packages (lxml), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-43818
gentoo normal CVE-2021-43818: 1 GLSA(s) (202208-06), 1 atom(s) (dev-python/lxml); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-43818
redhat medium https://access.redhat.com/security/cve/CVE-2021-43818
suse medium CVE-2021-43818 severity moderate: SUSE including 388 source package names (1.7.7.0.1.2016:python3-lxml-4.7.1-3.7.1, 1.8.6.0.3.2.5:python3-lxml-4.7.1-3.7.1, …), 640 product×package rows across 167 product lines (Container ses/7.1/cephcsi/cephcsi, Container ses/7.1/rook/ceph, … (167 product lines)): Fixed 366, Known Affected 231, Will Not Fix 43. https://www.suse.com/security/cve/CVE-2021-43818/
ubuntu medium CVE-2021-43818 medium priority: Ubuntu including 1 source packages (lxml), 8 status rows across 8 suites (bionic, focal, hirsute, impish, jammy, trusty, upstream, xenial): released 7, needs-triage 1. https://ubuntu.com/security/CVE-2021-43818

Affected software / configurations for CVE-2021-43818

Vendor Product Version Raw CPE
lxml lxml < 4.6.5 cpe:2.3:a:lxml:lxml:*:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
netapp solidfire cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*
netapp solidfire_enterprise_sds cpe:2.3:a:netapp:solidfire_enterprise_sds:-:*:*:*:*:*:*:*
netapp hci_storage_node_firmware cpe:2.3:o:netapp:hci_storage_node_firmware:-:*:*:*:*:*:*:*
oracle communications_cloud_native_core_binding_support_function 22.1.3 cpe:2.3:a:oracle:communications_cloud_native_core_binding_support_function:22.1.3:*:*:*:*:*:*:*
oracle communications_cloud_native_core_network_exposure_function 22.1.1 cpe:2.3:a:oracle:communications_cloud_native_core_network_exposure_function:22.1.1:*:*:*:*:*:*:*
oracle communications_cloud_native_core_policy 22.2.0 cpe:2.3:a:oracle:communications_cloud_native_core_policy:22.2.0:*:*:*:*:*:*:*
oracle http_server 12.2.1.3.0 cpe:2.3:a:oracle:http_server:12.2.1.3.0:*:*:*:*:*:*:*
oracle http_server 12.2.1.4.0 cpe:2.3:a:oracle:http_server:12.2.1.4.0:*:*:*:*:*:*:*
oracle zfs_storage_appliance_kit 8.8 cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*

References for CVE-2021-43818

URL Tags
https://github.com/lxml/lxml/commit/12fa9669007180a7bb87d990c375cf91ca5b664a Patch Third Party Advisory
https://github.com/lxml/lxml/commit/a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c#diff-59130575b4fb2932c957db2922977d7d89afb0b2085357db1a14615a2fcad776 Patch Third Party Advisory
https://github.com/lxml/lxml/commit/f2330237440df7e8f39c3ad1b1aa8852be3b27c0 Patch Third Party Advisory
https://github.com/lxml/lxml/security/advisories/GHSA-55x5-fj6c-h6m8 Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/12/msg00037.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TUIS2KE3HZ2AAQKXFLTJFZPP2IFHJTC7/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V2XMOM5PFT6U5AAXY6EFNT5JZCKKHK2V/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WZGNET2A4WGLSUXLBFYKNC5PXHQMI3I7/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQ4SPKJX3RRJK4UWA6FXCRHD2TVRQI44/
https://security.gentoo.org/glsa/202208-06 Third Party Advisory
https://security.netapp.com/advisory/ntap-20220107-0005/ Third Party Advisory
https://www.debian.org/security/2022/dsa-5043 Third Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html Patch Third Party Advisory
cvelogic Threat Intelligence