CVE-2022-28346 in the critical feed json
SQL Injection in Django
published 2022-04-12 4 y ago modified 2026-09-08 2 mo ago also BIT-django-2022-28346 , EUVD-2022-0087 , GHSA-2gwj-7jmv-h26r , PYSEC-2022-190
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 18.7%
- EPSS 18.7% chance of exploitation in 30 days, percentile 97%
- public exploits
- 0
- none known
Summary
An issue was discovered in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. QuerySet.annotate(), aggregate(), and extra() methods are subject to SQL injection in column aliases via a crafted dictionary (with dictionary expansion) as the passed **kwargs.
Patch / fix
- pypi django 2.2.28, 3.2.13, 4.0.4
- bitnami django 2.2.28, 3.2.13, 4.0.4
- djangoproject django 2.2.28, 3.2.13, 4.0.4
- python-django Debian 14, Debian 13, Debian 12 2:3.2.13-1
debian advisories DEBIAN-CVE-2022-28346
- python-django Ubuntu 18.04 LTS 1:1.11.11-1ubuntu1.17
- python-django Ubuntu 20.04 LTS 2:2.2.12-1ubuntu0.11
- python-django Ubuntu Pro 14.04 LTS 1.6.11-0ubuntu1.3+esm5
- python-django Ubuntu Pro 16.04 LTS 1.8.7-1ubuntu5.15+esm5
ubuntu advisories UBUNTU-CVE-2022-28346
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.11, satellite capsule 6.11, satellite 6.11 3.1.1.21-2.el7sat
- foreman satellite utils 6.11, satellite capsule 6.11, satellite 6.11 3.1.1.21-2.el8sat
- libsolv satellite capsule 6.11, satellite 6.11 0.7.22-1.el7pc
- libsolv satellite capsule 6.11, satellite 6.11 0.7.22-1.el8pc
- candlepin satellite 6.11 4.1.13-1.el7sat
- candlepin satellite 6.11 4.1.13-1.el8sat
- satellite satellite utils 6.11, satellite capsule 6.11, satellite 6.11 6.11.0-2.el7sat
- satellite satellite utils 6.11, satellite capsule 6.11, satellite 6.11 6.11.0-2.el8sat
red hat advisories RHSA-2022:5498RHSA-2022:5702RHSA-2022:8872RHSA-2022:5703RHSA-2022:5602RHSA-2022:5115
- python-Django openSUSE Leap 15.5 2.0.7-150000.1.27.1
- 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
suse advisories SUSE-SU-2024:2817-1SUSE-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.4-1.1
- python-Django Package Hub 15 SP3, openSUSE Leap 15.3 2.2.28-bp153.2.3.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:12094-1
- libdb Rocky Linux 8 5.3.28-42.el8_4
rocky linux advisories RLSA-2022:5498
- py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 3.2.13-r0
alpine advisories ALPINE-CVE-2022-28346
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.4-1
arch linux advisories AVG-2667
- github.com/django/django@2044dac commit
- github.com/django/django@2c09e68 commit
- github.com/django/django@8008288 commit
- github.com/django/django@93cae5c commit
- docs.djangoproject.com/en/4.0/releases/security/ advisory
- openwall.com/lists/oss-security/2022/04/11/1 advisory
- djangoproject.com/weblog/2022/apr/11/security-releases/ advisory
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-28346 updated cvss 9.4
Django: SQL injection in QuerySet.annotate(),aggregate() and extra()
-
Red Hat Ceph Storage 3 graphite-webaffected: no fix planned “Will not fix”
-
Red Hat Discovery 1 discovery-server-container Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completion Red Hat Satellite 6 python3-djangoaffected: no fix available
-
Red Hat Storage 3 graphite-webaffected: no fix planned “Will not fix”
-
Red Hat Update Infrastructure 4 for Cloud Providers python-django-guardian, python-drf-nested-routersaffected: no fix available
-
Red Hat Ansible Automation Platform 2.1 for RHEL 8 python-django 3.2.13-1.el8pc, python38-django 3.2.13-1.el8pc, automation-controller 4.1.2-2.el8ap, automation-controller-ui 4.1.2-2.el8ap, automation-controller-cli 4.1.2-2.el8ap, automation-controller-server 4.1.2-2.el8ap, +1 morefixed: vendor fix RHSA-2022:5702
-
Red Hat Automation Hub 4.2 for RHEL 7 python3-django 2.2.28-1.el7pc Red Hat Automation Hub 4.2 for RHEL 8 python3-django 2.2.28-1.el8pcfixed: vendor fix RHSA-2022:5703
-
Red Hat OpenStack Platform 16.1 python-django20 2.0.13-18.el8ost, python3-django20 2.0.13-18.el8ost, python-django20-bash-completion 2.0.13-18.el8ostfixed: vendor fix RHSA-2022:8872
-
Red Hat OpenStack Platform 16.2 python-django20 2.0.13-17.el8ostfixed: vendor fix RHSA-2022:5115
show 3 moreshow fewer
-
Red Hat Satellite 6.11 for RHEL 8 python-django 3.2.13-1.el8pc, python38-django 3.2.13-1.el8pcfixed: vendor fix RHSA-2022:5498
-
Red Hat RHUI 4 for RHEL 8 python-django 3.2.13-2.el8ui, python-pulpcore 3.17.6-3.el8uifixed: vendor fix RHSA-2022:5602
-
Red Hat Ansible Automation Platform 2.1 for RHEL 8 python-naya 1.1.1-1.el8pc, python-jinja2 3.0.3-1.el8pc, python38-naya 1.1.1-1.el8pc, python38-jinja2 3.0.3-1.el8pc, pulpcore-selinux 1.3.1-1.el8ap, python-pulpcore 3.15.9-2.el8pc, +3 more Red Hat OpenStack Platform 16.2 python3-django20 2.0.13-17.el8ost Red Hat Satellite 6.11 for RHEL 7 tfm 7.0-1.el7sat, gofer 2.12.5-7.el7sat, katello 4.3.0-3.el7sat, libsolv 0.7.22-1.el7pc, libcomps 0.1.18-1.el7pc, libsolv0 0.6.34-4.el7sat, +638 more Red Hat Satellite 6.11 for RHEL 8 libdb 5.3.28-42.el8_4, katello 4.3.0-3.el8sat, libsolv 0.7.22-1.el8pc, libcomps 0.1.18-1.el8pc, python-idna 3.3-1.el8pc, python-pbr 5.6.0-1.el8pc, +627 more Red Hat RHUI 4 for RHEL 8 python-pyjwt 1.7.1-8.el8ui, createrepo_c 0.20.0-2.el8ui, python-ecdsa 0.14.1-2.el8ui, rhui-tools 4.1.1.16-1.el8ui, python-future 0.18.2-5.el8ui, python38-pyjwt 1.7.1-8.el8ui, +31 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
18.66% chance of exploitation in the next 30 days, higher than 97% 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 | >=2.2, <2.2.28 >=3.2, <3.2.13 >=4.0, <4.0.4 |
2.2.28 3.2.13 4.0.4 |
| bitnami | django | >=2.2.0, <2.2.28 >=3.2.0, <3.2.13 >=4.0.0, <4.0.4 |
2.2.28 3.2.13 4.0.4 |
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
-
openwall.com
/lists/oss-security/2022/04/11/1
web, mailing-list, patch, third-party-advisory, advisory
-
djangoproject.com
/weblog/2022/apr/11/security-releases/
patch, vendor-advisory, advisory, article
-
github.com
/django/django/commit/2044dac5c6968441be6f534c4139bcf48c5c7e48
web
-
github.com
/django/django/commit/2c09e68ec911919360d5f8502cefc312f9e03c5d
web
-
github.com
/django/django/commit/800828887a0509ad1162d6d407e94d8de7eafc60
web
-
github.com
/django/django/commit/93cae5cb2f9a4ef1514cf1a41f714fef08005200
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
-
lists.debian.org
/debian-lts-announce/2022/04/msg00013.html
mailing-list, web, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20220609-0002/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-28346
advisory, web
-
docs.djangoproject.com
/en/4.0/releases/security
web
-
github.com
/advisories/GHSA-2gwj-7jmv-h26r
advisory
-
github.com
/django/django
package
-
github.com
/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-190.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-20220609-0002
web
-
djangoproject.com
/weblog/2022/apr/11/security-releases
web
Sources
- CVE List CVE-2022-28346
- GitHub Advisory GHSA-2gwj-7jmv-h26r
- NVD CVE-2022-28346
- OSV BIT-django-2022-28346
- OSV PYSEC-2022-190
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.