Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-43818

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-43818
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:01 UTC · Revision 1

Source evidence

CVE-2021-43818

core-osv · Original source

Published 13 Dec 2021, 18:15 UTC

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.

osv:CVE-2021-43818
Complete source record
{
  "id": "d9fc99520216b6cdcca8efa3b09f22682c74c651ae3260d6116073e9ce38c4bd",
  "url": "https://osv.dev/vulnerability/CVE-2021-43818",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-43818",
    "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.",
    "evidence": "osv:CVE-2021-43818",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-43818",
      "aliases": [
        "CVE-2021-43818",
        "GHSA-55x5-fj6c-h6m8",
        "PYSEC-2021-852"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/lxml/lxml",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "a9611ba80bc5196c1dd07a0b1964fcb603695d63"
                },
                {
                  "fixed": "12fa9669007180a7bb87d990c375cf91ca5b664a"
                },
                {
                  "fixed": "a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c"
                },
                {
                  "fixed": "f2330237440df7e8f39c3ad1b1aa8852be3b27c0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:lxml:lxml:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.6.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "12fa9669007180a7bb87d990c375cf91ca5b664a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f2330237440df7e8f39c3ad1b1aa8852be3b27c0"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "lxml-4.6.4-5",
            "lxml-4.6.4-4",
            "lxml-4.6.4-3",
            "lxml-4.6.4-2",
            "lxml-4.6.4-1",
            "lxml-4.6.4",
            "lxml-4.6.3",
            "lxml-4.6.2",
            "lxml-4.6.1",
            "lxml-4.6.0",
            "lxml-4.5.2",
            "lxml-4.5.1",
            "lxml-4.5.0",
            "lxml-4.4.1",
            "lxml-4.4.0",
            "lxml-4.3.2",
            "lxml-4.3.1",
            "lxml-4.3.0",
            "lxml-4.2.2",
            "lxml-4.2.1",
            "lxml-4.2.0",
            "lxml-4.1.1",
            "lxml-4.1.0",
            "lxml-4.0.0",
            "lxml-3.8.0-py27fix",
            "lxml-3.8.0",
            "lxml-3.7.2",
            "lxml-3.7.1",
            "lxml-3.7.0",
            "lxml-3.6.1",
            "lxml-3.6.0",
            "lxml-3.5.0",
            "lxml-3.5.0b1",
            "lxml-3.4.1",
            "lxml-3.4.0",
            "lxml-3.4.0beta1",
            "lxml-3.3.3",
            "lxml-3.3.2",
            "lxml-3.3.1",
            "lxml-3.3.0",
            "lxml-3.3.0beta5",
            "lxml-3.3.0beta4",
            "lxml-3.3.0beta3",
            "lxml-3.3.0beta2",
            "lxml-3.3.0beta1",
            "lxml-3.2.3",
            "lxml-3.2.2",
            "lxml-3.2.1",
            "lxml-3.2.0",
            "lxml-3.1.1",
            "lxml-3.1.0",
            "lxml-3.1beta1",
            "lxml-3.0.1",
            "lxml-3.0",
            "lxml-3.0beta1",
            "lxml-3.0alpha2",
            "lxml-3.0alpha1",
            "lxml-2.3.1",
            "lxml-2.3",
            "lxml-2.3beta1",
            "lxml-2.3alpha2",
            "lxml-2.3alpha1",
            "lxml-2.2.2",
            "lxml-2.2.1",
            "lxml-2.2",
            "lxml-2.1",
            "lxml-2.1beta3",
            "lxml-2.1beta2",
            "lxml-2.1beta1",
            "lxml-2.1alpha1",
            "lxml-2.0.1",
            "lxml-2.0",
            "lxml-2.0beta2",
            "lxml-2.0beta1",
            "lxml-2.0alpha6",
            "lxml-2.0alpha5",
            "lxml-2.0alpha4",
            "lxml-2.0alpha3",
            "lxml-2.0alpha2",
            "lxml-2.0alpha1",
            "lxml-1.2",
            "lxml-1.1",
            "lxml-1.1beta",
            "lxml-1.1alpha",
            "lxml-1.0",
            "lxml-1.0.beta",
            "lxml-0.9",
            "lxml-0.7",
            "lxml-0.6",
            "lxml-0.5.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-43818.json"
          }
        }
      ],
      "modified": "2026-10-20T10:55:04.669571049Z",
      "provider": "osv",
      "references": [
        "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://github.com/lxml/lxml/security/advisories/GHSA-55x5-fj6c-h6m8",
        "https://lists.debian.org/debian-lts-announce/2021/12/msg00037.html",
        "https://security.gentoo.org/glsa/202208-06",
        "https://security.netapp.com/advisory/ntap-20220107-0005/",
        "https://www.debian.org/security/2022/dsa-5043",
        "https://github.com/lxml/lxml/commit/12fa9669007180a7bb87d990c375cf91ca5b664a",
        "https://github.com/lxml/lxml/commit/a3eacbc0dcf1de1c822ec29fb7d090a4b1712a9c#diff-59130575b4fb2932c957db2922977d7d89afb0b2085357db1a14615a2fcad776",
        "https://github.com/lxml/lxml/commit/f2330237440df7e8f39c3ad1b1aa8852be3b27c0",
        "https://www.oracle.com/security-alerts/cpuapr2022.html",
        "https://www.oracle.com/security-alerts/cpujul2022.html"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  },
                  {
                    "introduced": "10.0"
                  },
                  {
                    "last_affected": "10.0"
                  },
                  {
                    "introduced": "11.0"
                  },
                  {
                    "last_affected": "11.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  },
                  {
                    "introduced": "35"
                  },
                  {
                    "last_affected": "35"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:communications_cloud_native_core_binding_support_function:22.1.3:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:communications_cloud_native_core_binding_support_function",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "22.1.3"
                  },
                  {
                    "last_affected": "22.1.3"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:communications_cloud_native_core_network_exposure_function:22.1.1:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:communications_cloud_native_core_network_exposure_function",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "22.1.1"
                  },
                  {
                    "last_affected": "22.1.1"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:communications_cloud_native_core_policy:22.2.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:communications_cloud_native_core_policy",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "22.2.0"
                  },
                  {
                    "last_affected": "22.2.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:http_server:12.2.1.3.0:*:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:http_server:12.2.1.4.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:http_server",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "12.2.1.3.0"
                  },
                  {
                    "last_affected": "12.2.1.3.0"
                  },
                  {
                    "introduced": "12.2.1.4.0"
                  },
                  {
                    "last_affected": "12.2.1.4.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:zfs_storage_appliance_kit",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.8"
                  },
                  {
                    "last_affected": "8.8"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-43818",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386840,
  "published_at": "2021-12-13T18:15:08.387+00:00"
}