CVE-2022-34265 in the critical feed json
Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection
published 2022-07-04 4 y ago modified 2026-09-08 2 mo ago also BIT-django-2022-34265 , EUVD-2022-0091 , GHSA-p64x-8rxx-wf6q , PYSEC-2022-213
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 73.6%
- EPSS 73.6% chance of exploitation in 30 days, percentile 99.4%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi django 3.2.14, 4.0.6
- bitnami django 3.2.14, 4.0.6
- djangoproject django 3.2.14, 4.0.6
- python-django Debian 14, Debian 13, Debian 12 2:4.0.6-1
debian advisories DEBIAN-CVE-2022-34265
- python-django Ubuntu 18.04 LTS 1:1.11.11-1ubuntu1.18
- python-django Ubuntu 20.04 LTS 2:2.2.12-1ubuntu0.12
- python-django Ubuntu 22.04 LTS 2:3.2.12-2ubuntu1.1
ubuntu advisories UBUNTU-CVE-2022-34265
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- foreman satellite utils 6.12, satellite capsule 6.12, satellite 6.12 3.3.0.17-1.el8sat
- candlepin satellite 6.12 4.1.15-1.el8sat
- foreman-cli satellite utils 6.12, satellite 6.12 3.3.0.17-1.el8sat
- foreman-ec2 satellite 6.12 3.3.0.17-1.el8sat
- foreman-gce satellite 6.12 3.3.0.17-1.el8sat
- rubygem-git satellite 6.12 1.11.0-1.el8sat
- foreman-ovirt satellite 6.12 3.3.0.17-1.el8sat
- python-django satellite capsule 6.12, satellite 6.12 3.2.14-2.el8pc
red hat advisories RHSA-2022:8506RHSA-2022:5738
- grafana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 6.7.4-3.29.1
- rubygem-puma OpenStack Cloud Crowbar 9 2.16.0-4.18.1
- ardana-ansible OpenStack Cloud 9 9.0+git.1660748476.c118d23-3.32.1
- ardana-cobbler OpenStack Cloud 9 9.0+git.1660747489.119efcd-3.19.1
- ardana-tempest OpenStack Cloud 9 9.0+git.1651855288.a2341ad-3.22.1
- openstack-nova OpenStack Cloud Crowbar 9, OpenStack Cloud 9 18.3.1~dev92-3.43.1
- python-Django1 OpenStack Cloud Crowbar 9, OpenStack Cloud 9 1.11.29-3.40.1
- rabbitmq-server OpenStack Cloud Crowbar 9, OpenStack Cloud 9 3.6.16-4.3.1
suse advisories SUSE-SU-2022:3339-1SUSE-SU-2022:3338-1
- python-Django5 openSUSE Tumbleweed 5.2.16-1.1
- python-Django4 openSUSE Tumbleweed 4.2.30-4.1
- python-Django6 openSUSE Tumbleweed 6.0-1.1
- python-Django openSUSE Tumbleweed 5.1.5-1.1
- python-Django4 openSUSE Tumbleweed 4.2.14-1.1
- python-Django openSUSE Tumbleweed 4.0.6-1.1
opensuse advisories openSUSE-SU-2026:11270-1openSUSE-SU-2026:11235-1openSUSE-SU-2026:10005-1openSUSE-SU-2025:14662-1openSUSE-SU-2024:14208-1openSUSE-SU-2024:12172-1
- libdb Rocky Linux 8 5.3.28-42.el8_4
rocky linux advisories RLSA-2022:8506
- py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 3.2.14-r0
alpine advisories ALPINE-CVE-2022-34265
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-django Arch Linux 4.0.6-1
arch linux advisories AVG-2788
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-34265 updated cvss 9.8
python-django: Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments
-
Red Hat Ansible Automation Platform 1.2 ansible-tower Red Hat Ansible Automation Platform 2 python-django, python3-django, automation-controlleraffected: no fix available
-
Red Hat Ceph Storage 3 python-django, python-django-bash-completionaffected: no fix planned “Out of support scope”
-
Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-djangoaffected: no fix available
-
Red Hat Satellite 6.12 for RHEL 8 python-django 3.2.14-2.el8pc, python39-django 3.2.14-2.el8pcfixed: vendor fix RHSA-2022:8506
-
Red Hat RHUI 4 for RHEL 8 python-django 3.2.14-3.el8ui, python38-django 3.2.14-3.el8uifixed: vendor fix RHSA-2022:5738
-
Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completion Red Hat OpenStack Platform 16.1 python-django20, python3-django20, python-django20-bash-completion Red Hat OpenStack Platform 16.2 python-django20, python3-django20, python-django20-bash-completion Red Hat Satellite 6 python3-django, python-pulp-container Red Hat Satellite 6.12 for RHEL 8 cjson 1.7.14-5.el8sat, libdb 5.3.28-42.el8_4, katello 4.5.0-1.el8sat, libsolv 0.7.22-4.el8pc, libcomps 0.1.18-4.el8pc, python-idna 3.3-2.el8pc, +639 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
73.61% chance of exploitation in the next 30 days, higher than 99.4% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | django | >=3.2a1, <3.2.14 >=4.0a1, <4.0.6 >=3.2, <3.2.14 >=4.0, <4.0.6 |
3.2.14 4.0.6 |
| bitnami | django | >=3.2.0, <3.2.14 >=4.0.0, <4.0.6 |
3.2.14 4.0.6 |
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
docs.djangoproject.com
/en/4.0/releases/security/
patch, vendor-advisory, advisory, web
-
djangoproject.com
/weblog/2022/jul/04/security-releases/
patch, vendor-advisory, advisory, article
-
github.com
/django/django/commit/0dc9c016fadb71a067e5a42be30164e3f96c0492
web
-
github.com
/django/django/commit/5e2f4ddf2940704a26a4ac782b851989668d74db
web
-
github.com
/django/django/commit/877c800f255ccaa7abde1fb944de45d1616f5cc9
web
-
github.com
/django/django/commit/a9010fe5555e6086a9d9ae50069579400ef0685e
web
-
debian.org
/security/2022/dsa-5254
vendor-advisory, web, third-party-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/
vendor-advisory, web
-
groups.google.com
/forum/#%21forum/django-announce
web
-
security.netapp.com
/advisory/ntap-20220818-0006/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-34265
advisory, web
-
docs.djangoproject.com
/en/4.0/releases/security
web
-
github.com
/advisories/GHSA-p64x-8rxx-wf6q
advisory
-
github.com
/django/django
package
-
github.com
/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-213.yaml
web
-
groups.google.com
/forum/#!forum/django-announce
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI
web
-
security.netapp.com
/advisory/ntap-20220818-0006
web
-
djangoproject.com
/weblog/2022/jul/04/security-releases
web
Sources
- CVE List CVE-2022-34265
- GitHub Advisory GHSA-p64x-8rxx-wf6q
- NVD CVE-2022-34265
- OSV BIT-django-2022-34265
- OSV PYSEC-2022-213
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.