PyPI (Python)Worst: High7 advisories

lxml: known vulnerabilities

lxml has 7 reviewed security advisories in the GitHub Advisory Database — 1 high, 6 moderate. The most recent was published 2026-04-24. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the lxml versions running across your servers, containers and images, and ranks what to patch first.

How to fix lxml

Upgrade lxml to a release at or above the fixed version shown for each advisory below. For PyPI (Python):

pip install --upgrade lxml (pin lxml>=6.1.0)

SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.

Advisories (7)

lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files High 7.5 CWE-611 — Affected: before 6.1.0. Fixed in 6.1.0. Published 2026-04-24. GHSA-vfmq-68hx-4jfw · CVE-2026-41066
lxml NULL Pointer Dereference allows attackers to cause a denial of service Moderate 5.3 CWE-476 — Affected: before 4.9.1. Fixed in 4.9.1. Published 2022-07-05. GHSA-wrxv-2j5q-m38w · CVE-2022-2309
lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through Moderate 8.2 CWE-74 CWE-79 — Affected: before 4.6.5. Fixed in 4.6.5. Published 2021-12-13. GHSA-55x5-fj6c-h6m8 · CVE-2021-43818
lxml vulnerable to Cross-Site Scripting Moderate 6.1 CWE-79 — Affected: before 4.6.3. Fixed in 4.6.3. Published 2021-03-21. GHSA-jq4v-f5q6-mjqq · CVE-2021-28957
lxml vulnerable to Cross-site Scripting Moderate 6.1 CWE-79 — Affected: before 4.6.2. Fixed in 4.6.2. Published 2020-12-03. GHSA-pgww-xf46-h92r · CVE-2020-27783
Improper Neutralization of Input During Web Page Generation in LXML Moderate 6.1 CWE-79 — Affected: before 4.2.5. Fixed in 4.2.5. Published 2018-12-02. GHSA-xp26-p53h-6h2p · CVE-2018-19787
lxml Cross-site Scripting Via Control Characters Moderate 6.1 CWE-79 — Affected: before 3.3.5. Fixed in 3.3.5. Published 2014-05-14. GHSA-57qw-cc2g-pv5p · CVE-2014-3146

Find lxml across your fleet

Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA, CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month. Start free.