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.
CVE-2022-28346
This critical-severity CVE scores 9.8 under NVD CVSS v3. EPSS exploit probability: 18.5%, top 3% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 9.8
- EG Score
- 9.8(medium)
- EG Risk
- —
- EPSS
- 96.9%
- KEV
- Not listed
Published
April 12, 2022
Last Modified
November 21, 2024
Advisory Details (9)
Auto-updated Jun 6, 2026oss-security - Django: CVE-2022-28346: Potential SQL injection in ``QuerySet.annotate()``, ``aggregate()``, and ``extra()``
http://www.openwall.com/lists/oss-security/2022/04/11/1Django security releases issued: 4.0.4, 3.2.13, and 2.2.28 | Weblog | Django
https://www.djangoproject.com/weblog/2022/apr/11/security-releases/[SECURITY] [DSA 5254-1] python-django security update
https://www.debian.org/security/2022/dsa-5254[SECURITY] Fedora 38 Update: python-django-4.0.10-1.fc38 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/[SECURITY] Fedora 37 Update: python-django-4.0.10-1.fc37 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/[SECURITY] [DLA 2982-1] python-django security update
https://lists.debian.org/debian-lts-announce/2022/04/msg00013.htmlArchive of security issues | Django documentation | Django
https://docs.djangoproject.com/en/4.0/releases/security/Vendor Advisories for CVE-2022-28346(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(7)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | python-django-doc (2:2.2.24-1ubuntu1.4) @ impish | 2026-05-26 | ubuntu |
| ubuntu | python-django (1.8.7-1ubuntu5.15+esm5) @ xenial | 2026-05-26 | ubuntu |
| redhat | python-django20-0:2.0.13-18.el8ost | 2022-12-07 | redhat |
| redhat | python-django-0:3.2.13-1.el8pc | 2022-07-25 | redhat |
| redhat | python3-django-0:2.2.28-1.el8pc | 2022-07-25 | redhat |
| redhat | python-pulpcore-0:3.17.6-3.el8ui | 2022-07-19 | redhat |
| redhat | python-django20-0:2.0.13-17.el8ost | 2022-06-22 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| django | 2.2 ... 4.0.3 (45 versions) | 2.2.28 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(7)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
- Red HatRHSA-2022:5115IMPORTANT2022-04-11
RHSA-2022:5115 — Important
- Red HatRHSA-2022:5602IMPORTANT2022-04-11
RHSA-2022:5602 — Important
- Red HatRHSA-2022:5702IMPORTANT2022-04-11
RHSA-2022:5702 — Important
- Red HatRHSA-2022:5703IMPORTANT2022-04-11
RHSA-2022:5703 — Important
- Red HatRHSA-2022:8872IMPORTANT2022-04-11
RHSA-2022:8872 — Important
- UbuntuUSN-5373-1HIGH
Django vulnerabilities
- UbuntuUSN-5373-2HIGH
Django vulnerabilities
Data Freshness Timeline
(refreshed 12× in last 7d / 44× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 104 total refreshes for this CVE.
- 2026-07-22 22:57 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 10:03 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-17 16:59 UTCOSV refresh
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:44 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-29 15:02 UTCOSV refresh
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-28 14:06 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:07 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-12 04:57 UTCOSV refresh
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-04 13:11 UTCEPSS rescore
- 2026-06-04 13:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-29 13:43 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-26 13:43 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
Publicly available exploits
(2 references)Working exploit code is in the public domain (2 GitHub PoCs). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCDeEpinGh0st/CVE-2022-28346First seen Apr 26, 2022
Django QuerySet.annotate(), aggregate(), extra() SQL 注入
Open source ↗ - GitHub PoCYouGina/CVE-2022-28346First seen Apr 25, 2022
SQL injection in QuerySet.annotate(), aggregate(), and extra()
Open source ↗
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
Frequently asked(5)
What is CVE-2022-28346?
When was CVE-2022-28346 disclosed?
Is CVE-2022-28346 actively exploited?
What is the CVSS score of CVE-2022-28346?
How do I remediate CVE-2022-28346?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2022-28346
Is Your Infrastructure Affected by CVE-2022-28346?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.