CVE-2022-2309
NULL Pointer Dereference in lxml/lxml
Also known as GHSA-wrxv-2j5q-m38w, PYSEC-2022-230
Mitigation
- Upgrade lxml to 4.9.1 or later.
Who should check
- Projects that depend on PyPI package lxml (< 4.9.1)
- Anyone running lxml/lxml >= unspecified, < 4.9.1
Vulnerability facts
- Affected
- lxml < 4.9.1
- Fixed in
- 4.9.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.0, CNA)CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- EPSS
- 2.51% chance of exploitation in 30 days (percentile 85, 2026-11-26)
- CWE
- CWE-476
- Modified
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 and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-2309. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-2309.md Affected: lxml < 4.9.1 Fixed in: 4.9.1 Steps: 1. Search this machine and project for lxml (PyPI), lxml/lxml: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://security.gentoo.org/glsa/202208-06
- 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://nvd.nist.gov/vuln/detail/CVE-2022-2309
- https://github.com/advisories/GHSA-wrxv-2j5q-m38w
Exploits and PoCs
Other
- https://security.netapp.com/advisory/ntap-20220915-0006/
- https://lists.debian.org/debian-lts-announce/2024/09/msg00021.html
- 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
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO
- https://security.netapp.com/advisory/ntap-20220915-0006
FAQ
Is CVE-2022-2309 being exploited?
There is no confirmed exploitation: CVE-2022-2309 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 2.51% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-2309?
Medium: CVSS 5.3 (v3.0, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2022-2309?
lxml < 4.9.1.
Is there a fix for CVE-2022-2309?
Yes. Fixed in 4.9.1. Upgrade lxml to 4.9.1 or later.
How do I check if I'm affected by CVE-2022-2309?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.