CVEfocus › CVE database › CVE-2022-2309

CVE-2022-2309NULL Pointer Dereference in lxml/lxml

CVSS 5.3 MediumEPSS 2.5% (higher than 85% of CVEs)Published 2022-07-05Updated 2025-11-04Assigner: @huntrdev

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.

CWE-476

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, PyPI, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

33Fixed
4Fix pending
1Under investigation
8Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libxml2Not affected
vulnerable_code_not_present
Ubuntu 26.04lxmlNot affected
vulnerable_code_not_present
Ubuntu 25.10libxml2Not affected
vulnerable_code_not_present
Ubuntu 25.10lxmlNot affected
vulnerable_code_not_present
Ubuntu 24.04libxml2Not affected
vulnerable_code_not_present
Ubuntu 24.04lxmlNot affected
vulnerable_code_not_present
Ubuntu 22.04libxml2Fixed2.9.13+dfsg-1ubuntu0.2UBUNTU-CVE-2022-2309
Ubuntu 22.04lxmlUnder investigationUBUNTU-CVE-2022-2309
Ubuntu 20.04libxml2Fixed2.9.10+dfsg-5ubuntu0.20.04.5UBUNTU-CVE-2022-2309
Ubuntu 20.04lxmlFix pendingUBUNTU-CVE-2022-2309
Ubuntu 18.04lxmlFix pendingUBUNTU-CVE-2022-2309
Ubuntu 16.04lxmlFix pendingUBUNTU-CVE-2022-2309
Ubuntu 14.04lxmlFix pendingUBUNTU-CVE-2022-2309
Debian 14libxml2Fixed2.9.14+dfsg-1.3DEBIAN-CVE-2022-2309
Debian 14lxmlFixed4.9.1-1DEBIAN-CVE-2022-2309
Debian 13libxml2Fixed2.9.14+dfsg-1.3DEBIAN-CVE-2022-2309
Debian 13lxmlFixed4.9.1-1DEBIAN-CVE-2022-2309
Debian 12libxml2Fixed2.9.14+dfsg-1.3~deb12u1DEBIAN-CVE-2022-2309
Debian 12lxmlFixed4.9.1-1DEBIAN-CVE-2022-2309
Red Hat Enterprise Linux 9python-lxmlFixed
Affected
0:4.6.5-3.el9RHSA-2022:8226
Red Hat Enterprise Linux 9python3-lxmlFixed
Affected
0:4.6.5-3.el9RHSA-2022:8226
Red Hat Enterprise Linux 8python-lxmlNot affected
Red Hat Enterprise Linux 8python3-lxmlNot affected
AlmaLinux 9python3-lxmlFixed4.6.5-3.el9ALSA-2022:8226
Rocky Linux 9python-lxmlFixed0:4.6.5-3.el9RLSA-2022:8226
Alpine Linux 3.24libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.24py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.23libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.23py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.22libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.22py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.21libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.21py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.20libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.20py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.19libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.19py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.18libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.18py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.17libxml2Fixed2.10.0-r0ALPINE-CVE-2022-2309
Alpine Linux 3.17py3-lxmlFixed4.9.2-r0ALPINE-CVE-2022-2309
Alpine Linux 3.16libxml2Fixed2.9.14-r1ALPINE-CVE-2022-2309
Alpine Linux 3.15libxml2Fixed2.9.14-r1ALPINE-CVE-2022-2309
Alpine Linux 3.14libxml2Fixed2.9.14-r1ALPINE-CVE-2022-2309
Alpine Linux 3.13libxml2Fixed2.9.14-r1ALPINE-CVE-2022-2309
PyPI librarylxmlFixed4.9.1GHSA-wrxv-2j5q-m38w

What the vendor says

As published in the CVE record by @huntrdev, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.