Is lxml 3.8 vulnerable?

PyPI · 1 release from 3.8.0 to 3.8.0 · latest lxml is 6.1.3 · checked 18 Nov 2026

Yes: 6 known advisories

Yes. lxml 3.8.0, the last 3.8 release, is affected by 6 known security advisories (1 high, 5 medium), including CVE-2026-41066, CVE-2022-2309, CVE-2018-19787. Upgrade to 6.1.0 or later to fix all of them.

Upgrade with:pip install 'lxml>=6.1.0'

Is your project on an affected lxml?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Advisories affecting lxml 3.8.0

  • HighCVE-2026-41066GHSA-vfmq-68hx-4jfw21 Apr 2026

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

    Affected
    <6.1.0
    Fixed in
    6.1.0
  • MediumCVE-2022-2309GHSA-wrxv-2j5q-m38w6 Jul 2022

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

    Affected
    <4.9.1
    Fixed in
    4.9.1
  • MediumCVE-2018-19787GHSA-xp26-p53h-6h2p13 May 2022

    Improper Neutralization of Input During Web Page Generation in LXML

    Affected
    <4.2.5
    Fixed in
    4.2.5
  • MediumCVE-2021-43818GHSA-55x5-fj6c-h6m813 Dec 2021

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

    Affected
    <4.6.5
    Fixed in
    4.6.5
  • MediumCVE-2021-28957GHSA-jq4v-f5q6-mjqq22 Mar 2021

    lxml vulnerable to Cross-Site Scripting

    Affected
    <4.6.3
    Fixed in
    4.6.3
  • MediumCVE-2020-27783GHSA-pgww-xf46-h92r7 Jan 2021

    lxml vulnerable to Cross-site Scripting

    Affected
    <4.6.2
    Fixed in
    4.6.2

Which of your client projects are still on lxml 3.8?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact lxml version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other lxml versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the PyPI registry. Refreshed daily.