VDB

CVE-2022-34265

CVE-2022-34265 PUBLISHED CVSS 9.800000190734863 CRITICAL

Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection

Reported by mitre · Published July 4, 2022

Django is fixed in 4.0.6 and 3.2.14 (PyPI)

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
DjangoPyPI4.0.6, 3.2.14
djangoBitnami4.0.6, 3.2.14
python-djangoArch Linux4.0.6-1
py3-djangoAlpine3.2.14-r0
djangoBitnami4.0.6, 3.2.14
djangodjangoproject4.0.6, 3.2.14

Risk scores

CVSS 3.1
9.800000190734863
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
n/an/an/a
PyPIDjango3.2a1, 4.0a1
archpython-django0
alpinepy3-django0
n/an/a*

Timeline

  • Jul 4, 2022 CVE Published
  • Jul 5, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 9, 2026 Security Advisory (6 in total, the first dated here)
  • Mar 17, 2026 Distribution Patch (3 in total, the first dated here)
  • Jun 22, 2026 Coalition ESS Score
  • Sep 8, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-34265
vulnetix vdb fixes CVE-2022-34265

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-34265/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 ›