CVE-2022-2309 json
NULL Pointer Dereference in lxml/lxml
published 2022-07-05 4 y ago modified 2026-06-17 4 mo ago also GHSA-wrxv-2j5q-m38w , PYSEC-2022-230 , EUVD-2022-0148
- cvss
- 5.3
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi lxml 4.9.1
- lxml lxml/lxml 4.9.1
- lxml Debian 14, Debian 13, Debian 12 4.9.1-1
- libxml2 Debian 12 2.9.14+dfsg-1.3~deb12u1
- libxml2 Debian 14, Debian 13 2.9.14+dfsg-1.3
debian advisories DEBIAN-CVE-2022-2309
- libxml2 Ubuntu 20.04 LTS 2.9.10+dfsg-5ubuntu0.20.04.5
- libxml2 Ubuntu 22.04 LTS 2.9.13+dfsg-1ubuntu0.2
ubuntu advisories UBUNTU-CVE-2022-2309
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-lxml RHEL 9 4.6.5-3.el9
- python3-lxml RHEL 9 4.6.5-3.el9
red hat advisories RHSA-2022:8226
- python-lxml SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +11 more 4.7.1-150200.3.10.1
- python-lxml SLE Module for Public Cloud 15 4.7.1-150100.6.6.1
suse advisories SUSE-SU-2022:2908-1SUSE-SU-2022:2878-1
- libxml2 openSUSE Tumbleweed 2.10.1-1.1
opensuse advisories openSUSE-SU-2024:12290-1
- python3-lxml AlmaLinux 9 4.6.5-3.el9
almalinux advisories ALSA-2022:8226
- python-lxml Rocky Linux 9 4.6.5-3.el9
rocky linux advisories RLSA-2022:8226
- libxml2 Alpine 3.16, Alpine 3.15, Alpine 3.14 +1 more 2.9.14-r1
- libxml2 Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 2.10.0-r0
- py3-lxml Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 4.9.2-r0
alpine advisories ALPINE-CVE-2022-2309
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libxml2 CBL-Mariner 2.0 2.10.0-1
- python-lxml CBL-Mariner 2.0 4.9.1-1
azure linux advisories AZL-10058AZL-10059
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-2309 updated cvss 7.5
lxml: NULL Pointer Dereference in lxml
-
Red Hat Enterprise Linux 9 python-lxml, python3-lxmlaffected: no fix available
-
Red Hat Enterprise Linux AppStream (v. 9) python-lxml 4.6.5-3.el9, python3-lxml 4.6.5-3.el9fixed: vendor fix RHSA-2022:8226
-
Red Hat Enterprise Linux 8 python-lxml, python3-lxml Red Hat Software Collections rh-python38-python-lxmlnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.45% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.dev https://huntr.dev/bounties/8264e74f-edda-4c40-9956-49de635105ba referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| GitHub | 3.0 | 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | lxml | <4.9.1 |
4.9.1 |
Affected products
- lxml lxml/lxml
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
References
-
github.com
/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f
web, patch, third-party-advisory
-
huntr.dev
/bounties/8264e74f-edda-4c40-9956-49de635105ba
web, exploit, issue-tracking, patch, third-party-advisory
-
security.gentoo.org
/glsa/202208-06
vendor-advisory, web, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ/
vendor-advisory
-
security.netapp.com
/advisory/ntap-20220915-0006/
third-party-advisory
-
lists.debian.org
/debian-lts-announce/2024/09/msg00021.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2022-2309
advisory
-
github.com
/advisories/GHSA-wrxv-2j5q-m38w
advisory
-
github.com
/lxml/lxml
package
-
github.com
/lxml/lxml/blob/master/CHANGES.txt
web
-
github.com
/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2022-230.yaml
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO
web
-
security.netapp.com
/advisory/ntap-20220915-0006
web
Sources
- CVE List CVE-2022-2309
- GitHub Advisory GHSA-wrxv-2j5q-m38w
- NVD CVE-2022-2309
- OSV PYSEC-2022-230
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.