Description
NULL Pointer Dereference allows attackers to cause a denial of service (or application crash). This only applies when lxml is used together with libxml2 2.9.10 through 2.9.14. libxml2 2.9.9 and earlier are not affected. It allows triggering crashes through forged input data, given a vulnerable code sequence in the application. The vulnerability is caused by the iterwalk function (also used by the canonicalize function). Such code shouldn't be in wide-spread use, given that parsing + iterwalk would usually be replaced with the more efficient iterparse function. However, an XML converter that serialises to C14N would also be vulnerable, for example, and there are legitimate use cases for this code sequence. If untrusted input is received (also remotely) and processed via iterwalk function, a crash can be triggered.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| lxml | lxml/lxml | unspecified – < 4.9.1 | 4.9.1 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libxml2 | 2.9.14+dfsg-1.3 | — |
| Debian 14 | lxml | 4.9.1-1 | — |
| Debian 13 | libxml2 | 2.9.14+dfsg-1.3 | — |
| Debian 13 | lxml | 4.9.1-1 | — |
| Debian 12 | libxml2 | 2.9.14+dfsg-1.3~deb12u1 | — |
| Debian 12 | lxml | 4.9.1-1 | — |
| Debian 11 | libxml2 | 2.9.10+dfsg-6.7+deb11u5 | DLA-3878-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | libxml2 | 2.9.13+dfsg-1ubuntu0.2 | USN-5760-1 |
| Ubuntu 22.04 LTS | lxml | No fix yet | — |
| Ubuntu 20.04 LTS | libxml2 | 2.9.10+dfsg-5ubuntu0.20.04.5 | USN-5760-1 |
| Ubuntu 18.04 LTS | libxml2 | 2.9.4+dfsg1-6.1ubuntu1.8 | USN-5760-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | lxml | No fix yet | — |
| Ubuntu Pro 18.04 LTS | lxml | No fix yet | — |
| Ubuntu Pro 16.04 LTS | lxml | No fix yet | — |
| Ubuntu Pro 14.04 LTS | lxml | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | python-lxml +1 | 4.6.5-3.el9 | RHSA-2022:8226 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | python3-lxml | 4.6.5-3.el9 | ALSA-2022:8226 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 9 | python-lxml | 4.6.5-3.el9 | RLSA-2022:8226 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP4 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SLES 15 SP3 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SLES 15 SP2 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SLES 15 | python-lxml | 4.7.1-150100.6.6.1 | SUSE-SU-2022:2878-1 |
| SLES 2 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP2 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SLE HPC 15 SP2 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SUSE Manager Server 4.1 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SUSE Manager Retail Branch Server 4.1 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SUSE Manager Proxy 4.1 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| SUSE Enterprise Storage 7 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libxml2 | 2.10.1-1.1 | openSUSE-SU-2024:12290-1 |
| openSUSE Leap 15.4 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
| openSUSE Leap 15.3 | python-lxml | 4.7.1-150200.3.10.1 | SUSE-SU-2022:2908-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.24 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.23 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.23 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.22 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.22 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.21 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.21 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.20 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.20 | py3-lxml | 4.9.2-r0 | — |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.19 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.18 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.18 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.17 | libxml2 | 2.10.0-r0 | — |
| Alpine v3.17 | py3-lxml | 4.9.2-r0 | — |
| Alpine v3.16 | libxml2 | 2.9.14-r1 | — |
| Alpine v3.15 | libxml2 | 2.9.14-r1 | — |
| Alpine v3.14 | libxml2 | 2.9.14-r1 | — |
| Alpine v3.13 | libxml2 | 2.9.14-r1 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | python3-lxml | 4.7.1-3.amzn2023.0.1 | ALAS2023-2023-034 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | libxml2 | 2.10.0-1 | — |
| Azure Linux 2 (CBL-Mariner) | python-lxml | 4.9.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | python3-lxml | 4.6.5-3.el9 | ELSA-2022-8226 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | lxml | < 4.9.1 | 4.9.1 | GHSA-wrxv-2j5q-m38w |
Advisories 14
- ALSA-2022:8226 Moderate: python-lxml security update AlmaLinux Security Advisories · Oct 29, 2026
- USN-5760-1 libxml2 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-3878-1 libxml2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:12290-1 libxml2-2-2.10.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:2908-1 Security update for python-lxml SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:2878-1 Security update for python-lxml SUSE / openSUSE Security Updates · Feb 4, 2026
- RHSA-2022:8226 Red Hat Security Advisory: python-lxml security update Red Hat Security Advisories (RHSA) · Nov 22, 2025
- WID-SEC-2023-2229 Splunk Splunk Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 18, 2025
- WID-SEC-2023-1542 Red Hat OpenShift: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 18, 2025
- RLSA-2022:8226 Moderate: python-lxml security update Rocky Linux Security Advisories · Oct 9, 2025
- WID-SEC-2023-1424 Xerox FreeFlow Print Server für Solaris: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 6, 2025
- WID-SEC-2022-0864 lxml: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Sep 5, 2024
- ALAS2023-2023-034 Important: python-lxml security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 22, 2023
- ELSA-2022-8226 Moderate: python-lxml security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Nov 22, 2022
References
- https://huntr.dev/bounties/8264e74f-edda-4c40-9956-49de635105ba
- https://github.com/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f
- GLSA-202208-06 vendor-advisory
- https://security.netapp.com/advisory/ntap-20220915-0006/
- FEDORA-2022-ed0eeb6a20 vendor-advisory
- FEDORA-2022-ed17f59c1d vendor-advisory