cve.bz

CVE-2022-28347 SQL Injection

9.8 criticalEPSS 2.9%Fix available

Critical (9.8). EPSS 2.9% 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
A SQL injection issue was discovered in QuerySet.explain() in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. This occurs by passing a crafted dictionary (with dictionary expansion) as the **options argument, and placing the injection payload in an option name.

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
2.9% (unchanged from 2.9% a week ago; 2.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 87th 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-28347 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-28347?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-28347?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-28347 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_linux11.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w24h-v9qh-8gxjPyPIdjango>=2.2 <2.2.282.2.28
GHSA-w24h-v9qh-8gxjPyPIdjango>=3.2 <3.2.133.2.13
GHSA-w24h-v9qh-8gxjPyPIdjango>=4.0 <4.0.44.0.4
PYSEC-2022-191PyPIdjango>=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
Debian11python-django2:2.2.28-1~deb11u1DSA-5254-1
Debian12, 13, 14python-django2:3.2.13-1DEBIAN-CVE-2022-28347
Ubuntu18.04:LTSpython-django1:1.11.11-1ubuntu1.17USN-5373-1
Ubuntu20.04:LTSpython-django2:2.2.12-1ubuntu0.11UBUNTU-CVE-2022-28347 USN-5373-1
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 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
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7libsolv0:0.7.22-1.el7pcRHSA-2022:5498
Red Hatsatellite:6.11::el7, satellite_capsule:6.11::el7, satellite_utils:6.11::el7foreman0:3.1.1.21-2.el7satRHSA-2022:5498
11 more for Red Hat in the JSON and on Red Hat's page.
SUSEPackage Hub 15 SP3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-1
openSUSELeap 15.3python-Django2.2.28-bp153.2.3.1openSUSE-SU-2023:0005-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-28347

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, the product is not vulnerable since it does not implement the vulnerable method QuerySet.explain() introduced in Django 2.1.x onward.

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 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 OpenStack Platform 16.1python-djangoAffected
Red Hat OpenStack Platform 16.2python-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-28347.

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