CVE-2022-2309
NULL Pointer Dereference in lxml/lxml
Reported by @huntrdev · Published July 5, 2022
lxml is fixed in 86368e9cf70a0ad23cccd5ee32de847149af0c6f and 4.9.1 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| lxml | PyPI | 86368e9cf70a0ad23cccd5ee32de847149af0c6f, 4.9.1 |
| py3-lxml | Alpine | 4.9.2-r0 |
| libxml2 | Alpine | 2.10.0-r0, 2.9.14-r1 |
| python3-lxml | Amazon Linux | 4.7.1-3.amzn2023.0.1 |
| lxml/lxml | lxml | 4.9.1 |
| lxml | lxml | 4.9.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| lxml | lxml/lxml | unspecified |
| alpine | py3-lxml | 0 |
| lxml | lxml/lxml | |
| lxml | lxml/lxml | * |
| alpine | libxml2 | 0, 0 |
| amazon:2023 | python3-lxml | 0 |
| PyPI | lxml | 0 |
Timeline
- Jul 5, 2022 CVE Published
- Jul 6, 2022 EPSS Score (30 in total, the first dated here)
- Nov 4, 2025 CVE Updated
- Mar 9, 2026 Security Advisory (51 in total, the first dated here)
- Jul 5, 2026 Coalition ESS Score
- Nov 21, 2026 Distribution Patch (47 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-2309
vulnetix vdb fixes CVE-2022-2309
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-2309/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- GLSA-202208-06 vendor-advisoryx_refsource_GENTOO
- x_refsource_CONFIRM
- FEDORA-2022-ed0eeb6a20 vendor-advisoryx_refsource_FEDORA
- FEDORA-2022-ed17f59c1d vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2022-2309 advisory
- https://github.com/advisories/GHSA-wrxv-2j5q-m38w advisory
- https://github.com/lxml/lxml url
- https://github.com/lxml/lxml/blob/master/CHANGES.txt url
- https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2022-230.yaml advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ url
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HGYC6L7ENH5VEGN3YWFBYMGKX6WNS7HZ url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/URHHSIBTPTALXMECRLAC2EVDNAFSR5NO url
- https://security.netapp.com/advisory/ntap-20220915-0006 advisory
- Multiples vulnérabilités dans les produits Splunk advisory
- https://lists.debian.org/debian-lts-announce/2024/09/msg00021.html url