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

- Severity: Medium 5.3 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.51%, higher than 85% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-07-05T09:00:12.000Z
- Modified: 2026-06-17T04:41:40.237Z
- Also known as: GHSA-wrxv-2j5q-m38w, PYSEC-2022-230
- Weaknesses: CWE-476
- Assigned by: @huntrdev

## 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.

(As written by CVE List.)

## Affected

- lxml lxml/lxml: from unspecified before 4.9.1
- lxml (PyPI): before 4.9.1; before 86368e9cf70a0ad23cccd5ee32de847149af0c6f
- lxml lxml: before 4.9.1
- fedoraproject fedora: 36; 37

## Every score

- @huntrdev: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://huntr.dev/bounties/8264e74f-edda-4c40-9956-49de635105ba> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f> (fix, patch, third-party-advisory, web)
- <https://security.gentoo.org/glsa/202208-06> (third-party-advisory, vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220915-0006/> (third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ/> (vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00021.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-2309> (advisory)
- <https://github.com/advisories/GHSA-wrxv-2j5q-m38w> (advisory)
- <https://github.com/lxml/lxml> (package)
- <https://github.com/lxml/lxml/blob/master/CHANGES.txt> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2022-230.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO> (web)
- <https://security.netapp.com/advisory/ntap-20220915-0006> (web)

## Sources

- CVE List: [CVE-2022-2309](https://www.cve.org/CVERecord?id=CVE-2022-2309), CVE Terms of Use, modified 2025-11-04
- GitHub Advisory Database: [GHSA-wrxv-2j5q-m38w](https://github.com/advisories/GHSA-wrxv-2j5q-m38w), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2022-2309](https://nvd.nist.gov/vuln/detail/CVE-2022-2309), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-230](https://osv.dev/vulnerability/PYSEC-2022-230), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-2309 · Whole record: https://cve.day/CVE-2022-2309.json · Rebuilt by cve.day 2026-11-25T22:58:12.707Z
