Install
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
Source · Homepage · Ask AI Mode · · Markdown
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
- Python XML Parsing: ElementTree, lxml, and How to Choose webscraping.ai, 26 Jul 2026
- Beyond lxml: Faster and More Pythonic Parsing with pygixml and selectolax dev.to, 8 Nov 2025
- Web Scraping with Python: Scraping Data Using Requests and lxml dev.to, 5 May 2025
- Mastering lxml in Python: Parse XML and HTML Like a Pro dev.to, 5 Apr 2025
- lxml 5.3.0 does not seem to support python 3.13.1t free threading build stackoverflow.com, 18 Jan 2025
On Hacker News
- Better Python Scraping - Installing lxml and Beautiful Soup 36 points, 38 comments, 28 Jun 2011
- Lxml: an underappreciated web scraping library 24 points, 6 comments, 11 Dec 2008
Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.