CVE-2021-43818
JSON

8.2high

HTML Cleaner allows crafted and SVG embedded scripts to pass through

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
2.30% (higher than 83% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-55x5-fj6c-h6m8PYSEC-2021-852

Description

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.

Affected

Product or packageVersionsReported by
lxml lxml< 4.6.5, before 4.6.5CVE List, NVD
lxml (PyPI)before 4.6.5, before f2330237440df7e8f39c3ad1b1aa8852be3b27c0, before 12fa9669007180a7bb87d990c375cf91ca5b664a, before a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9cGitHub Advisory Database, PyPA Advisory Database
fedoraproject fedora34, 35NVD
debian debian_linux9.0, 10.0, 11.0NVD
netapp solidfireNot specifiedNVD
netapp solidfire_enterprise_sdsNot specifiedNVD
netapp hci_storage_node_firmwareNot specifiedNVD
oracle communications_cloud_native_core_binding_support_function22.1.3NVD
oracle communications_cloud_native_core_network_exposure_function22.1.1NVD
oracle communications_cloud_native_core_policy22.2.0NVD
oracle http_server12.2.1.3.0, 12.2.1.4.0NVD
oracle zfs_storage_appliance_kit8.8NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N
GitHub8.2medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:H/SA:N
NVD7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

CWE-74CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Patches

The issue has been resolved in lxml 4.6.5.

Workarounds

None.

References

The issues are tracked under the report IDs GHSL-2021-1037 and GHSL-2021-1038.

NVD (es)

lxml es una biblioteca para procesar XML y HTML en el lenguaje Python. En versiones anteriores a 4.6.5, el limpiador de HTML en lxml.html dejaba pasar determinado contenido de scripts manipulados, así como contenido de scripts en archivos SVG insertados usando URIs de datos. Los usuarios que empleen el limpiador de HTML en un contexto relevante para la seguridad deben actualizar a lxml versión 4.6.5 para recibir un parche. No se presentan soluciones conocidas disponibles

References

https://github.com/lxml/lxml/security/advisories/GHSA-55x5-fj6c-h6m8advisory, third-party-advisory, web
https://github.com/lxml/lxml/commit/12fa9669007180a7bb87d990c375cf91ca5b664afix, patch, third-party-advisory, web
https://github.com/lxml/lxml/commit/a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c#diff-59130575b4fb2932c957db2922977d7d89afb0b2085357db1a14615a2fcad776fix, patch, third-party-advisory, web
https://github.com/lxml/lxml/commit/f2330237440df7e8f39c3ad1b1aa8852be3b27c0fix, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQ4SPKJX3RRJK4UWA6FXCRHD2TVRQI44/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WZGNET2A4WGLSUXLBFYKNC5PXHQMI3I7/vendor-advisory
https://lists.debian.org/debian-lts-announce/2021/12/msg00037.htmlmailing-list, third-party-advisory, web
https://www.debian.org/security/2022/dsa-5043third-party-advisory, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TUIS2KE3HZ2AAQKXFLTJFZPP2IFHJTC7/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V2XMOM5PFT6U5AAXY6EFNT5JZCKKHK2V/vendor-advisory
https://www.oracle.com/security-alerts/cpuapr2022.htmlpatch, third-party-advisory, web
https://security.netapp.com/advisory/ntap-20220107-0005/third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-43818 changed 2025-12-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-55x5-fj6c-h6m8 changed 2026-07-08CC-BY-4.0
NVDCVE-2021-43818 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-852 changed 2026-04-09CC-BY-4.0