lxml

Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.

6.2.1Latest, 29 Nov 2026
443MDownloads, last month
0Advisories on the latest
14Advisories, all versions
BSD-3-ClauseLicence
3.1KStars
5.6/10OpenSSF Scorecard

Known advisories

Severity Advisory Fix Published
PYSEC-2026-87 CVE-2026-41066 Fixed in 6.1.0 24 Apr 2026
High lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files CVE-2026-41066 Fixed in 6.1.0 21 Apr 2026
Moderate lxml NULL Pointer Dereference allows attackers to cause a denial of service CVE-2022-2309 Fixed in 4.9.1 6 Jul 2022
PYSEC-2022-230 CVE-2022-2309 Fixed in 4.9.1 5 Jul 2022
Moderate lxml Cross-site Scripting Via Control Characters CVE-2014-3146 Fixed in 3.3.5 14 May 2022
Moderate Improper Neutralization of Input During Web Page Generation in LXML CVE-2018-19787 Fixed in 4.2.5 13 May 2022
Moderate lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through CVE-2021-43818 Fixed in 4.6.5 13 Dec 2021
PYSEC-2021-852 CVE-2021-43818 Fixed in 4.6.5 13 Dec 2021
Moderate lxml vulnerable to Cross-Site Scripting CVE-2021-28957 Fixed in 4.6.3 22 Mar 2021
PYSEC-2021-19 CVE-2021-28957 Fixed in 4.6.3 21 Mar 2021
Moderate lxml vulnerable to Cross-site Scripting CVE-2020-27783 Fixed in 4.6.2 7 Jan 2021
PYSEC-2020-62 CVE-2020-27783 Fixed in 4.6.2 3 Dec 2020
PYSEC-2018-12 CVE-2018-19787 Fixed in 4.2.5 2 Dec 2018
PYSEC-2014-9 CVE-2014-3146 Fixed in 3.3.5 14 May 2014

In the news

On Hacker News

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.