Is lxml 4.6 vulnerable?
PyPI · 6 releases from 4.6.0 to 4.6.5 · latest lxml is 6.1.3 · checked 18 Nov 2026
Yes: 2 known advisories
Yes. lxml 4.6.5, the last 4.6 release, is affected by 2 known security advisories (1 high, 1 medium), including CVE-2026-41066, CVE-2022-2309. 3 more affect earlier 4.6.x releases. Upgrade to 6.1.0 or later to fix all of them.
pip install 'lxml>=6.1.0'Is your project on an affected lxml?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Advisories affecting lxml 4.6.5
lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
- Affected
- <6.1.0
- Fixed in
- 6.1.0
lxml NULL Pointer Dereference allows attackers to cause a denial of service
- Affected
- <4.9.1
- Fixed in
- 4.9.1
Fixed within 4.6.x, affecting earlier releases
lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through
- Affected
- <4.6.5
- Fixed in
- 4.6.5
lxml vulnerable to Cross-Site Scripting
- Affected
- <4.6.3
- Fixed in
- 4.6.3
lxml vulnerable to Cross-site Scripting
- Affected
- <4.6.2
- Fixed in
- 4.6.2
Every lxml 4.6.x release
Affected: 4.6.0 to 4.6.5. Latest lxml: 6.1.3.
| Version | Known advisories |
|---|---|
| lxml 4.6.5 | CVE-2026-41066, CVE-2022-2309 |
| lxml 4.6.4 | CVE-2026-41066, CVE-2022-2309, CVE-2021-43818 |
| lxml 4.6.3 | CVE-2026-41066, CVE-2022-2309, CVE-2021-43818 |
| lxml 4.6.2 | CVE-2026-41066, CVE-2022-2309, CVE-2021-43818, CVE-2021-28957 |
| lxml 4.6.1 | CVE-2026-41066, CVE-2022-2309, CVE-2021-43818, CVE-2021-28957, CVE-2020-27783 |
| lxml 4.6.0 | CVE-2026-41066, CVE-2022-2309, CVE-2021-43818, CVE-2021-28957, CVE-2020-27783 |
Which of your client projects are still on lxml 4.6?
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.