{"answers":{"affected":"3 open source packages ship an affected version, including lxml. It affects 11 products.","exploited":"There is no known exploitation of CVE-2021-43818 in the wild and no public exploit code.","fix":"Upgrade lxml to 4.6.5 or later.","what":"CVE-2021-43818 is a high-severity cross-site scripting vulnerability in Debian Debian Linux, published on 13 Dec 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-43818 and fix it if it is affected.\n\nWhat it is: CVE-2021-43818 is a high-severity cross-site scripting vulnerability in Debian Debian Linux, published on 13 Dec 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-43818 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- lxml (PyPI): affected all versions; fixed in 4.6.5\n- lxml (PyPI): affected all versions; fixed in 4.6.5\n- lxml (PyPI): affected all versions; fixed in 4.6.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-43818/ (Markdown: https://insights.sbomify.com/CVE-2021-43818/index.md)","id":"CVE-2021-43818","markdown":"https://insights.sbomify.com/CVE-2021-43818/index.md","name":"CVE-2021-43818","record":{"aliases":["ALPINE-CVE-2021-43818","ALSA-2022:1763","ALSA-2022:1932","AZL-7025","CLSA-2024-1729629058","CLSA-2026-1792442901","DEBIAN-CVE-2021-43818","DLA-2871-1","DSA-5043-1","GHSA-55x5-fj6c-h6m8","MGASA-2021-0595","OESA-2022-1482","PYSEC-2021-852","RHSA-2022:1664","RHSA-2022:1763","RHSA-2022:1932","RLSA-2022:1763","RLSA-2022:1932","UBUNTU-CVE-2021-43818","USN-5225-1","openSUSE-SU-2024:11713-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python XML/HTML library","requires_auth":"none","summary":"Attackers can inject malicious scripts via crafted HTML or embedded SVGs, leading to XSS, affecting users of the lxml library.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"lxml","vendor":"lxml"},{"product":"hci_storage_node_firmware","vendor":"netapp"},{"product":"solidfire","vendor":"netapp"},{"product":"solidfire_enterprise_sds","vendor":"netapp"},{"product":"communications_cloud_native_core_binding_support_function","vendor":"oracle"},{"product":"communications_cloud_native_core_network_exposure_function","vendor":"oracle"},{"product":"communications_cloud_native_core_policy","vendor":"oracle"},{"product":"http_server","vendor":"oracle"},{"product":"zfs_storage_appliance_kit","vendor":"oracle"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"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.","ecosystems":["AlmaLinux:8","PyPI","Red Hat:enterprise_linux:8::appstream","Red Hat:rhel_software_collections:3::el7","Rocky Linux:8"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"HTML Cleaner allows crafted and SVG embedded scripts to pass through","id":"CVE-2021-43818","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":"debian:debian_linux","products":["debian:debian_linux","fedoraproject:fedora","netapp:solidfire","oracle:communications_cloud_native_core_binding_support_function","oracle:communications_cloud_native_core_policy","oracle:http_server","oracle:zfs_storage_appliance_kit"],"type":"xss","year":"2021"},"n_packages":179,"n_references":14,"next":{"headline":"Stargate-Bukkit improperly handles vehicles causing data duplication.","id":"CVE-2021-43819"},"packages":[{"ecosystem":"PyPI","fixed":["4.6.5"],"introduced":["0"],"last_affected":[],"package":"lxml","purl":null,"source":"GHSA-55x5-fj6c-h6m8"},{"ecosystem":"PyPI","fixed":["4.6.5"],"introduced":["0"],"last_affected":[],"package":"lxml","purl":"pkg:pypi/lxml","source":"GHSA-55x5-fj6c-h6m8"},{"ecosystem":"PyPI","fixed":["4.6.5"],"introduced":["0"],"last_affected":[],"package":"lxml","purl":"pkg:pypi/lxml","source":"PYSEC-2021-852"},{"ecosystem":"AlmaLinux:8","fixed":["4.2.3-4.el8"],"introduced":["0"],"last_affected":[],"package":"python3-lxml","purl":"pkg:rpm/almalinux/python3-lxml","source":"ALSA-2022:1932"},{"ecosystem":"AlmaLinux:8","fixed":["3.9.7-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39","purl":"pkg:rpm/almalinux/python39","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["0.29.21-5.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-Cython","purl":"pkg:rpm/almalinux/python39-Cython","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.1-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-PyMySQL","purl":"pkg:rpm/almalinux/python39-PyMySQL","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["20.3.0-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-attrs","purl":"pkg:rpm/almalinux/python39-attrs","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.14.3-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-cffi","purl":"pkg:rpm/almalinux/python39-cffi","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.0.4-19.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-chardet","purl":"pkg:rpm/almalinux/python39-chardet","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.3.1-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-cryptography","purl":"pkg:rpm/almalinux/python39-cryptography","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.9.7-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-debug","purl":"pkg:rpm/almalinux/python39-debug","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.9.7-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-devel","purl":"pkg:rpm/almalinux/python39-devel","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.9.7-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-idle","purl":"pkg:rpm/almalinux/python39-idle","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.10-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-idna","purl":"pkg:rpm/almalinux/python39-idna","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.1.1-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-iniconfig","purl":"pkg:rpm/almalinux/python39-iniconfig","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.9.7-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-libs","purl":"pkg:rpm/almalinux/python39-libs","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["4.6.5-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-lxml","purl":"pkg:rpm/almalinux/python39-lxml","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["4.7.1-4.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-mod_wsgi","purl":"pkg:rpm/almalinux/python39-mod_wsgi","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["8.5.0-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-more-itertools","purl":"pkg:rpm/almalinux/python39-more-itertools","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.19.4-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-numpy","purl":"pkg:rpm/almalinux/python39-numpy","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.19.4-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-numpy-doc","purl":"pkg:rpm/almalinux/python39-numpy-doc","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.19.4-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-numpy-f2py","purl":"pkg:rpm/almalinux/python39-numpy-f2py","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["20.4-4.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-packaging","purl":"pkg:rpm/almalinux/python39-packaging","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["20.2.4-7.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pip","purl":"pkg:rpm/almalinux/python39-pip","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["20.2.4-7.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pip-wheel","purl":"pkg:rpm/almalinux/python39-pip-wheel","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["0.13.1-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pluggy","purl":"pkg:rpm/almalinux/python39-pluggy","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["3.11-10.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-ply","purl":"pkg:rpm/almalinux/python39-ply","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["5.8.0-4.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-psutil","purl":"pkg:rpm/almalinux/python39-psutil","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.8.6-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-psycopg2","purl":"pkg:rpm/almalinux/python39-psycopg2","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.8.6-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-psycopg2-doc","purl":"pkg:rpm/almalinux/python39-psycopg2-doc","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.8.6-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-psycopg2-tests","purl":"pkg:rpm/almalinux/python39-psycopg2-tests","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.10.0-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-py","purl":"pkg:rpm/almalinux/python39-py","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.7.1-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pybind11","purl":"pkg:rpm/almalinux/python39-pybind11","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.7.1-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pybind11-devel","purl":"pkg:rpm/almalinux/python39-pybind11-devel","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.20-3.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pycparser","purl":"pkg:rpm/almalinux/python39-pycparser","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["2.4.7-5.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pyparsing","purl":"pkg:rpm/almalinux/python39-pyparsing","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["1.7.1-4.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pysocks","purl":"pkg:rpm/almalinux/python39-pysocks","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["6.0.2-2.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pytest","purl":"pkg:rpm/almalinux/python39-pytest","source":"ALSA-2022:1763"},{"ecosystem":"AlmaLinux:8","fixed":["5.4.1-1.module_el8.6.0+2780+a40f65e1"],"introduced":["0"],"last_affected":[],"package":"python39-pyyaml","purl":"pkg:rpm/almalinux/python39-pyyaml","source":"ALSA-2022:1763"}],"prev":{"headline":"Reflected Cross-Site-Scripting vulnerability in Collabora Online","id":"CVE-2021-43817"},"products":["lxml"],"published":"2021-12-13","related":[{"cvss_score":10,"headline":"ProFTPD Improper Access Control","id":"CVE-2015-3306","kev_date_added":"2026-10-08","published":"2015-05-18"},{"cvss_score":9.9,"headline":"RoundCube Webmail Deserialization of Untrusted Data","id":"CVE-2025-49113","kev_date_added":"2026-02-20","published":"2025-06-02"},{"cvss_score":9.8,"headline":"GNU InetUtils Argument Injection","id":"CVE-2026-24061","kev_date_added":"2026-01-26","published":"2026-01-21"},{"cvss_score":9.8,"headline":"Linux Kernel Improper Check for Unusual or Exceptional Conditions","id":"CVE-2025-39682","kev_date_added":"2026-09-18","published":"2025-09-05"},{"cvss_score":9.8,"headline":"Mozilla Firefox Use-After-Free","id":"CVE-2024-9680","kev_date_added":"2024-10-15","published":"2024-10-09"},{"cvss_score":9.8,"headline":"RARLAB UnRAR Directory Traversal","id":"CVE-2022-30333","kev_date_added":"2022-08-09","published":"2022-05-09"},{"cvss_score":9.8,"headline":"Roundcube Webmail SQL Injection","id":"CVE-2021-44026","kev_date_added":"2023-06-22","published":"2021-11-19"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-12-18","vendors":["lxml"]},"summary":"Attackers can inject malicious scripts via crafted HTML or embedded SVGs, leading to XSS, affecting users of the lxml library.","url":"https://insights.sbomify.com/CVE-2021-43818/"}