cve.bz

CVE-2022-28346 SQL Injection

9.8 criticalEPSS 19%Fix available

Critical (9.8). EPSS 19% estimated probability of exploitation activity in the next 30 days. Fixed in django 2.2.28, 3.2.13, 4.0.4.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
19% (unchanged from 19% a week ago; 19% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-28346 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-28346?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-28346?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-28346 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
djangoproject:djangofrom 2.2 before 2.2.28
djangoproject:djangofrom 3.2 before 3.2.13
djangoproject:djangofrom 4.0 before 4.0.4
debian:debian_linux9.0
debian:debian_linux11.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2gwj-7jmv-h26rPyPIdjango>=2.2 <2.2.282.2.28
GHSA-2gwj-7jmv-h26rPyPIdjango>=3.2 <3.2.133.2.13
GHSA-2gwj-7jmv-h26rPyPIdjango>=4.0 <4.0.44.0.4
PYSEC-2022-190PyPIdjango>=4.0 <4.0.4
>=3.2 <3.2.13
>=2.2 <2.2.28
4.0.4, 3.2.13, 2.2.28

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9python-django1:1.10.7-2+deb9u16DLA-2982-1
Debian10python-django1:1.11.29-1+deb10u3DLA-3177-1
Debian11python-django2:2.2.28-1~deb11u1DSA-5254-1
Debian12, 13, 14python-django2:3.2.13-1DEBIAN-CVE-2022-28346
Ubuntu18.04:LTSpython-django1:1.11.11-1ubuntu1.17UBUNTU-CVE-2022-28346 USN-5373-1
Ubuntu20.04:LTSpython-django2:2.2.12-1ubuntu0.11UBUNTU-CVE-2022-28346 USN-5373-1
UbuntuPro:14.04:LTSpython-django1.6.11-0ubuntu1.3+esm5UBUNTU-CVE-2022-28346 USN-5373-2
UbuntuPro:16.04:LTSpython-django1.8.7-1ubuntu5.15+esm5UBUNTU-CVE-2022-28346 USN-5373-2
Red Hatansible_automation_platform:2.1::el8automation-controller, automation-controller-ui, automation-controller-cli and 2 more0:4.1.2-2.el8apRHSA-2022:5702
Red Hatansible_automation_platform:2.1::el8python-django, python38-django0:3.2.13-1.el8pcRHSA-2022:5702
Red Hatansible_automation_platform:4.2::el7python3-django0:2.2.28-1.el7pcRHSA-2022:5703
Red Hatansible_automation_platform:4.2::el8python3-django0:2.2.28-1.el8pcRHSA-2022:5703
Red Hatopenstack:16.1::el8python-django20, python3-django20, python-django20-bash-completion0:2.0.13-18.el8ostRHSA-2022:8872
Red Hatopenstack:16.2::el8python-django200:2.0.13-17.el8ostRHSA-2022:5115
Red Hatrhui:4::el8python-django0:3.2.13-2.el8uiRHSA-2022:5602
Red Hatrhui:4::el8python-pulpcore, python38-pulpcore0:3.17.6-3.el8uiRHSA-2022:5602
Red Hatsatellite:6.11::el7candlepin0:4.1.13-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-actionpack0:6.0.4.7-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-puma, tfm-rubygem-puma-debuginfo0:5.6.2-1.el7satRHSA-2022:5498
Red Hatsatellite:6.11::el7tfm-rubygem-sidekiq0:5.2.10-1.el7satRHSA-2022:5498
13 more for Red Hat in the JSON and on Red Hat's page.
SUSEHPE Helion OpenStack 8venv-openstack-horizon-hpe12.0.5~dev6-14.48.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-ansible8.0+git.1660773729.3789a6d-3.85.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8ardana-cobbler8.0+git.1660773402.d845a45-3.47.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-heat9.0.8~dev22-12.45.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-murano4.0.2~dev3-12.38.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8grafana6.7.4-4.23.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8openstack-heat-templates0.0.0+git.1654529662.75fa04a-3.27.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8openstack-murano, openstack-murano-doc4.0.2~dev3-3.12.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8python-Django1.11.29-3.42.1SUSE-SU-2022:3338-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8rabbitmq-server3.6.16-3.13.1SUSE-SU-2022:3338-1
SUSEOpenStack Cloud 8venv-openstack-horizon12.0.5~dev6-14.48.1SUSE-SU-2022:3338-1
SUSEOpenStack Cloud 9ardana-ansible9.0+git.1660748476.c118d23-3.32.1SUSE-SU-2022:3339-1
16 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-1
openSUSELeap 15.5python-Django2.0.7-150000.1.27.1SUSE-SU-2024:2817-1
openSUSETumbleweedpython-Django4.0.4-1.1openSUSE-SU-2024:12094-1
openSUSETumbleweedpython-Django5.1.5-1.1openSUSE-SU-2025:14662-1
openSUSETumbleweedpython-Django44.2.14-1.1openSUSE-SU-2024:14208-1
openSUSETumbleweedpython-Django44.2.30-4.1openSUSE-SU-2026:11235-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0-1.1openSUSE-SU-2026:10005-1
Rocky Linux8libdb0:5.3.28-42.el8_4RLSA-2022:5498
Alpinev3.16, v3.17, v3.18 and 6 morepy3-django3.2.13-r0ALPINE-CVE-2022-28346

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat OpenStack does ship the affected version of Django, however, vulnerability is not exposed in the product as it does not make use of vulnerable code. We may update Django in a future release of OpenStack.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.1 for RHEL 8automation-controller-0:4.1.2-2.el8apFixed 2022-07-25RHSA-2022:5702
Red Hat Ansible Automation Platform 2.1 for RHEL 8python-django-0:3.2.13-1.el8pcFixed 2022-07-25RHSA-2022:5702
Red Hat Automation Hub 4.2 for RHEL 7python3-django-0:2.2.28-1.el7pcFixed 2022-07-25RHSA-2022:5703
Red Hat Automation Hub 4.2 for RHEL 8python3-django-0:2.2.28-1.el8pcFixed 2022-07-25RHSA-2022:5703
Red Hat OpenStack Platform 16.1python-django20-0:2.0.13-18.el8ostFixed 2022-12-07RHSA-2022:8872
Red Hat OpenStack Platform 16.2python-django20-0:2.0.13-17.el8ostFixed 2022-06-22RHSA-2022:5115
Red Hat Satellite 6.11 for RHEL 8python-django-0:3.2.13-1.el8pcFixed 2022-07-05RHSA-2022:5498
RHUI 4 for RHEL 8python-django-0:3.2.13-2.el8uiFixed 2022-07-19RHSA-2022:5602
RHUI 4 for RHEL 8python-pulpcore-0:3.17.6-3.el8uiFixed 2022-07-19RHSA-2022:5602
Red Hat Ceph Storage 3graphite-webWill not fix
Red Hat Discovery 1discovery-server-containerAffected
Red Hat OpenStack Platform 13 (Queens)python-djangoAffected
Red Hat Satellite 6python3-djangoAffected
Red Hat Storage 3graphite-webWill not fix
Red Hat Update Infrastructure 4 for Cloud Providerspython-django-guardianAffected
Red Hat Update Infrastructure 4 for Cloud Providerspython-drf-nested-routersAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-28346.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON