PyPI package

lxml 4.0.0 vulnerabilities, and the version that fixes all of them

lxml 4.0.0 has 6 known vulnerabilities (1 rated high or critical); 6.1.0 fixes all of them.

PyPI (opens in a new tab) describes it as “Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.”

Known vulnerabilities
6
1 rated high or critical
Released
Sep 17, 2017
Latest is 6.1.3
Licence
BSD-3-Clause
Dependencies
None
Resolved by deps.dev

What to upgrade to

6.1.0 is the closest release with no known vulnerabilities.

  • 4.9.4

    Newest 4.x release. Released Dec 19, 2023.

    1 known vulnerability, worst rated warning
  • 6.1.0Upgrade to this

    Fixes all 6 known vulnerabilities. Released Apr 18, 2026.

    No known vulnerabilities
  • 6.1.3

    Latest release. Released Sep 2, 2026.

    No known vulnerabilities

6.1.0 came out on Apr 18, 2026. A coding agent trained before then doesn’t know it exists, so it may suggest an older release. AI knowledge cutoff dates

Hand the fix to your coding agent

One task with the upgrade, the file to change and why. Paste it into Claude Code, Cursor or Codex.

Findings

Every advisory for lxml 4.0.0

Known exploited first (CISA KEV), then by how likely they are to be exploited (FIRST EPSS), then by severity. Each id links to its OSV.dev record.

  1. CriticalCVE-2026-41066 on OSV.dev (opens in a new tab)GHSA-vfmq-68hx-4jfw

    lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files

    Fixed in 6.1.0. Published Apr 21, 2026.

  2. WarningCVE-2022-2309 on OSV.dev (opens in a new tab)GHSA-wrxv-2j5q-m38w

    lxml NULL Pointer Dereference allows attackers to cause a denial of service

    Fixed in 4.9.1. Published Jul 6, 2022.

  3. WarningCVE-2018-19787 on OSV.dev (opens in a new tab)GHSA-xp26-p53h-6h2p

    Improper Neutralization of Input During Web Page Generation in LXML

    Fixed in 4.2.5. Published May 13, 2022.

  4. WarningCVE-2021-43818 on OSV.dev (opens in a new tab)GHSA-55x5-fj6c-h6m8

    lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through

    Fixed in 4.6.5. Published Dec 13, 2021.

  5. WarningCVE-2021-28957 on OSV.dev (opens in a new tab)GHSA-jq4v-f5q6-mjqq

    lxml vulnerable to Cross-Site Scripting

    Fixed in 4.6.3. Published Mar 22, 2021.

  6. WarningCVE-2020-27783 on OSV.dev (opens in a new tab)GHSA-pgww-xf46-h92r

    lxml vulnerable to Cross-site Scripting

    Fixed in 4.6.2. Published Jan 7, 2021.

Is lxml the only one?

Paste a public GitHub repo or drop your requirements.txt or pyproject.toml and see every vulnerable, end-of-life or deprecated dependency, with one fix task. Free, no sign-up.

Check your whole repo

How this page is checked

StackPrism asks OSV.dev which advisories affect exactly lxml 4.0.0, merges duplicates filed under several ids, and ranks them with CISA’s Known Exploited Vulnerabilities list and FIRST EPSS. Release dates and deprecation come from deps.dev and PyPI. No AI writes this page: every sentence comes from that data, refreshed every few hours.

Last checked against PyPI, OSV.dev, deps.dev, CISA KEV and FIRST EPSS (didn’t answer). Findings from that source may be missing; this page refreshes soon.