Vulnerability · Published Jul 5, 2022 · Assigned by @huntrdev

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

Medium 5.3

In plain English

A medium-severity null pointer dereference in lxml/lxml from lxml. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)5.3Medium
Exploit odds (30 days)2.4%top 15.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9python3-lxml4.6.5-3.el9ALSA-2022:8226
Alpine:v3.20libxml22.10.0-r0ALPINE-CVE-2022-2309
Alpine:v3.21libxml22.10.0-r0ALPINE-CVE-2022-2309
Alpine:v3.22libxml22.10.0-r0ALPINE-CVE-2022-2309
Alpine:v3.23libxml22.10.0-r0ALPINE-CVE-2022-2309
Alpine:v3.24libxml22.10.0-r0ALPINE-CVE-2022-2309
Alpine:v3.20py3-lxml4.9.2-r0ALPINE-CVE-2022-2309
Alpine:v3.21py3-lxml4.9.2-r0ALPINE-CVE-2022-2309
Alpine:v3.22py3-lxml4.9.2-r0ALPINE-CVE-2022-2309
Alpine:v3.23py3-lxml4.9.2-r0ALPINE-CVE-2022-2309
Alpine:v3.24py3-lxml4.9.2-r0ALPINE-CVE-2022-2309
Debian:12libxml22.9.14+dfsg-1.3~deb12u1DEBIAN-CVE-2022-2309
Debian:13libxml22.9.14+dfsg-1.3DEBIAN-CVE-2022-2309
Debian:14libxml22.9.14+dfsg-1.3DEBIAN-CVE-2022-2309
Debian:12lxml4.9.1-1DEBIAN-CVE-2022-2309
Debian:13lxml4.9.1-1DEBIAN-CVE-2022-2309
Debian:14lxml4.9.1-1DEBIAN-CVE-2022-2309
PyPIlxml4.9.1PYSEC-2022-230
PyPIlxml4.9.1GHSA-wrxv-2j5q-m38w
Rocky Linux:9python-lxml0:4.6.5-3.el9RLSA-2022:8226
Ubuntu:22.04:LTSlibxml22.9.13+dfsg-1ubuntu0.2USN-5760-1
Ubuntu:22.04:LTSlibxml22.9.13+dfsg-1ubuntu0.2UBUNTU-CVE-2022-2309
Ubuntu:22.04:LTSlxmlno fix listedUBUNTU-CVE-2022-2309

Affected products (as reported)

VendorProductVersions
lxml lxml/lxml unspecified – before 4.9.1

Weakness: CWE-476 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References