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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-07-05 · Modified: 2025-11-04
- Aliases: ALPINE-CVE-2022-2309, MGASA-2022-0331, SUSE-SU-2022:2878-1, SUSE-SU-2022:2908-1, GHSA-wrxv-2j5q-m38w, PYSEC-2022-230, RHSA-2022:8226, UBUNTU-CVE-2022-2309, DEBIAN-CVE-2022-2309, openSUSE-SU-2024:12290-1
- Record: https://cvemate.com/vulnerability/CVE-2022-2309 · JSON: https://cvemate.com/vulnerability/CVE-2022-2309/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 2.448%, percentile 84.898%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected (first 20 of 31)

- alpine libxml2 (Alpine Linux): \< 2.9.14-r1 \| \< 2.10.0-r0
- alpine py3-lxml (Alpine Linux): \< 4.9.2-r0
- debian libxml2 (Debian): \< 2.9.14+dfsg-1.3~deb12u1 \| \< 2.9.14+dfsg-1.3
- debian lxml (Debian): \< 4.9.1-1
- ubuntu libxml2 (Ubuntu): \< 2.9.10+dfsg-5ubuntu0.20.04.5 \| \< 2.9.13+dfsg-1ubuntu0.2
- ubuntu lxml (Ubuntu): All versions (No fix recorded)
- fedoraproject fedora: 36 \| 37
- lxml lxml: \< 4.9.1
- lxml lxml/lxml: ≥ unspecified, \< 4.9.1
- mageia python-lxml (Mageia): \< 4.9.1-1.mga8
- PyPI lxml (PyPI): \< 86368e9cf70a0ad23cccd5ee32de847149af0c6f \| \< 4.9.1
- opensuse libxml2&distro=openSUSE Tumbleweed (openSUSE): \< 2.10.1-1.1
- opensuse python-lxml&distro=openSUSE Leap 15.3 (openSUSE): \< 4.7.1-150200.3.10.1
- opensuse python-lxml&distro=openSUSE Leap 15.4 (openSUSE): \< 4.7.1-150200.3.10.1
- redhat python-lxml (Red Hat): \< 0:4.6.5-3.el9
- redhat python-lxml-debugsource (Red Hat): \< 0:4.6.5-3.el9
- redhat python3-lxml (Red Hat): \< 0:4.6.5-3.el9
- redhat python3-lxml-debuginfo (Red Hat): \< 0:4.6.5-3.el9
- suse python-lxml&distro=SUSE Enterprise Storage 7 (SUSE Linux Enterprise): \< 4.7.1-150200.3.10.1
- suse python-lxml&distro=SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS (SUSE Linux Enterprise): \< 4.7.1-150200.3.10.1

## References (first 20 of 38)

- <https://huntr.dev/bounties/8264e74f-edda-4c40-9956-49de635105ba>
- <https://github.com/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f>
- <https://security.gentoo.org/glsa/202208-06>
- <https://security.netapp.com/advisory/ntap-20220915-0006/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ/>
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00021.html>
- <https://security.alpinelinux.org/vuln/CVE-2022-2309>
- <https://advisories.mageia.org/MGASA-2022-0331.html>
- <https://bugs.mageia.org/show_bug.cgi?id=30772>
- <https://lists.suse.com/pipermail/sle-security-updates/2022-August/011973.html>
- <https://www.suse.com/support/update/announcement/2022/suse-su-20222878-1/>
- <https://bugzilla.suse.com/1201253>
- <https://www.suse.com/security/cve/CVE-2022-2309>
- <https://www.suse.com/support/update/announcement/2022/suse-su-20222908-1/>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-2309>
- <https://github.com/advisories/GHSA-wrxv-2j5q-m38w>
- <https://github.com/lxml/lxml>
- <https://github.com/lxml/lxml/blob/master/CHANGES.txt>
- <https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2022-230.yaml>

---

Data as of 2026-12-05T09:58:46.127Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
