cve.bz

CVE-2021-43818 Cross-site Scripting

7.1 highEPSS 2.7%Fix available

High (7.1). EPSS 2.7% estimated probability of exploitation activity in the next 30 days. Fixed in lxml 4.6.5.

On this page
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.

Severity

CVSS 3.1

7.1 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
EPSS
2.7% (unchanged from 2.7% a week ago; 2.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 86th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-12-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-43818 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-43818?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-43818?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-43818 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
lxml:lxmlbefore 4.6.5
fedoraproject:fedora34
fedoraproject:fedora35
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0
oracle:communications_cloud_native_core_binding_support_function22.1.3
oracle:communications_cloud_native_core_network_exposure_function22.1.1
oracle:communications_cloud_native_core_policy22.2.0
oracle:http_server12.2.1.3.0
oracle:http_server12.2.1.4.0
oracle:zfs_storage_appliance_kit8.8

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-55x5-fj6c-h6m8PyPIlxml<4.6.54.6.5
PYSEC-2021-852PyPIlxml<4.6.54.6.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9lxml3.7.1-1+deb9u5DLA-2871-1
Debian10lxml4.3.2-1+deb10u4DSA-5043-1
Debian11lxml4.6.3+dfsg-0.1+deb11u1DSA-5043-1
Debian12, 13, 14lxml4.7.1-1DEBIAN-CVE-2021-43818
Ubuntu18.04:LTSlxml4.2.1-1ubuntu0.6UBUNTU-CVE-2021-43818 USN-5225-1
Ubuntu20.04:LTSlxml4.5.0-1ubuntu0.5UBUNTU-CVE-2021-43818 USN-5225-1
Ubuntu22.04:LTSlxml4.7.1-1UBUNTU-CVE-2021-43818
UbuntuPro:14.04:LTSlxml3.3.3-1ubuntu0.2+esm5UBUNTU-CVE-2021-43818 USN-5225-1
UbuntuPro:16.04:LTSlxml3.5.0-1ubuntu0.4+esm2UBUNTU-CVE-2021-43818 USN-5225-1
Red Hatenterprise_linux:8::appstreamCython, python2-Cython, Cython-debugsource and 1 more0:0.28.1-7.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreamCython, python38-Cython, Cython-debugsource and 1 more0:0.29.14-4.module+el8.4.0+8888+89bc7e79RHSA-2022:1764
Red Hatenterprise_linux:8::appstreamPyYAML, python2-pyyaml, PyYAML-debugsource and 1 more0:3.12-16.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreamPyYAML, python38-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.5.0+10721+14d8e0d5RHSA-2022:1764
Red Hatenterprise_linux:8::appstreamPyYAML, python39-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.5.0+10613+59a13ec4RHSA-2022:1763
Red Hatenterprise_linux:8::appstreambabel, python2-babel0:2.5.1-10.module+el8.5.0+11014+88fc0d0bRHSA-2022:1821
Red Hatenterprise_linux:8::appstreambabel, python38-babel0:2.7.0-11.module+el8.5.0+11015+9c1c7c42RHSA-2022:1764
Red Hatenterprise_linux:8::appstreammod_wsgi, python38-mod_wsgi0:4.6.8-3.module+el8.4.0+8888+89bc7e79RHSA-2022:1764
Red Hatenterprise_linux:8::appstreammod_wsgi, python39-mod_wsgi0:4.7.1-4.module+el8.4.0+9822+20bf1249RHSA-2022:1763
Red Hatenterprise_linux:8::appstreamnumpy, python2-numpy, numpy-debugsource and 3 more1:1.14.2-16.module+el8.4.0+9406+221a4565RHSA-2022:1821
Red Hatenterprise_linux:8::appstreamnumpy, python38-numpy, numpy-debugsource and 3 more0:1.17.3-6.module+el8.5.0+12205+a865257aRHSA-2022:1764
Red Hatenterprise_linux:8::appstreamnumpy, python39-numpy, numpy-debugsource and 3 more0:1.19.4-3.module+el8.5.0+12204+54860423RHSA-2022:1763
109 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 9 morepython-lxml4.7.1-3.7.1SUSE-SU-2022:0803-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 and 2 morepython-lxml3.6.1-8.5.1SUSE-SU-2022:0895-1
SUSEOpenStack Cloud 9ardana-barbican9.0+git.1644879908.8a641c1-3.13.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-barbican7.0.1~dev24-3.35.2SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-cinder13.0.10~dev24-3.38.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-designate7.0.2~dev2-3.35.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-glance17.0.1~dev30-3.33.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-heat11.0.4~dev4-3.35.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-horizon14.1.1~dev11-4.39.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-ironic11.1.5~dev18-4.33.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-keystone14.2.1~dev9-3.36.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-magnum7.2.1~dev1-4.35.1SUSE-SU-2022:1729-1
22 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3python-lxml4.7.1-3.7.1openSUSE-SU-2022:0803-1
AlmaLinux8babel, python2-babel2.5.1-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python-nose-docs1.3.7-31.module_el8.5.0+2569+5c5719bcALSA-2022:1821
AlmaLinux8python-sqlalchemy-doc1.3.2-2.module_el8.5.0+2569+5c5719bcALSA-2022:1821
AlmaLinux8python2, python2-libs, python2-test and 4 more2.7.18-10.module_el8.6.0+2781+fed64c13.almaALSA-2022:1821
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-PyMySQL0.8.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-attrs17.4.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-backports1.0-16.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-backports-ssl_match_hostname3.5.0.1-12.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-bson, python2-pymongo, python2-pymongo-gridfs3.7.0-1.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-chardet3.0.4-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-coverage4.5.1-4.module_el8.6.0+2781+fed64c13ALSA-2022:1821
104 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.28.1-7.module+el8.4.0+403+9ae17a31RLSA-2022:1821
Rocky Linux8Cython0:0.28.1-7.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8Cython0:0.29.14-4.module+el8.4.0+570+c2eaf144RLSA-2022:1764
Rocky Linux8Cython0:0.29.21-5.module+el8.4.0+574+843c4898RLSA-2022:1763
Rocky Linux8PyYAML0:3.12-16.module+el8.4.0+403+9ae17a31RLSA-2022:1821
Rocky Linux8PyYAML0:3.12-16.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8PyYAML0:5.4.1-1.module+el8.4.0+574+843c4898RLSA-2022:1763 RLSA-2022:1764
Rocky Linux8PyYAML0:5.4.1-1.module+el8.5.0+672+ab6eb015RLSA-2022:1763 RLSA-2022:1764
Rocky Linux8babel0:2.5.1-10.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8babel0:2.7.0-11.module+el8.5.0+672+ab6eb015RLSA-2022:1764
Rocky Linux8libdb0:5.3.28-42.el8_4RLSA-2022:5498
Rocky Linux8mod_wsgi0:4.6.8-3.module+el8.4.0+570+c2eaf144RLSA-2022:1764
7 more for Rocky Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This flaw is rated as Moderate because code execution is limited to the web browser scope.

Following products ship affected component, however the vulnerability is not exposed in the product code. Therefore, we are reducing their impact to moderate.

* Red Hat Satellite 6.10

* Red Hat Update Infrastructure for Cloud Providers 4

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python39:3.9-8060020220118220913.d3811607Fixed 2022-05-10RHSA-2022:1763
Red Hat Enterprise Linux 8python38:3.8-8060020220120164031.5294be16Fixed 2022-05-10RHSA-2022:1764
Red Hat Enterprise Linux 8python27:2.7-8060020220210185952.8cdc2268Fixed 2022-05-10RHSA-2022:1821
Red Hat Enterprise Linux 8python-lxml-0:4.2.3-4.el8Fixed 2022-05-10RHSA-2022:1932
Red Hat Satellite 6.11 for RHEL 8python-lxml-0:4.7.1-1.el8pcFixed 2022-07-05RHSA-2022:5498
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-lxml-0:4.4.1-8.el7Fixed 2022-05-02RHSA-2022:1664
Red Hat Ansible Automation Platform 1.2lxmlAffected
Red Hat Ansible Automation Platform 2lxmlAffected
Red Hat Ansible Tower 3lxmlAffected
Red Hat Enterprise Linux 6python-lxmlOut of support scope
Red Hat Enterprise Linux 7python-lxmlOut of support scope
Red Hat Enterprise Linux 8inkscape:flatpak/python-lxmlNot affected
Red Hat Enterprise Linux 9python-lxmlNot affected
Red Hat OpenStack Platform 13 (Queens)python-lxmlOut of support scope
Red Hat Update Infrastructure 3 for Cloud Providerspython-lxmlAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-43818.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON