VDB

CVE-2022-2309

CVE-2022-2309 PUBLISHED CVSS 5.3 MEDIUM

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.

PackageEcosystemFixed in
lxmlPyPI86368e9cf70a0ad23cccd5ee32de847149af0c6f, 4.9.1
py3-lxmlAlpine4.9.2-r0
libxml2Alpine2.10.0-r0, 2.9.14-r1
python3-lxmlAmazon Linux4.7.1-3.amzn2023.0.1
lxml/lxmllxml4.9.1
lxmllxml4.9.1

Risk scores

CVSS 3.0
5.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected products

VendorProductVersions
lxmllxml/lxmlunspecified
alpinepy3-lxml0
lxmllxml/lxml
lxmllxml/lxml*
alpinelibxml20, 0
amazon:2023python3-lxml0
PyPIlxml0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›