# CVE-2022-28346: SQL Injection in Django

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 18.7%, higher than 97% of CVEs (2026-12-01)
- Published: 2022-04-12T00:00:00.000Z
- Modified: 2026-09-08T08:46:32.563Z
- Also known as: GHSA-2gwj-7jmv-h26r, BIT-DJANGO-2022-28346, PYSEC-2022-190
- Weaknesses: CWE-89
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- django (PyPI): from 2.2 before 2.2.28; from 3.2 before 3.2.13; from 4.0 before 4.0.4
- djangoproject django: from 2.2 before 2.2.28; from 3.2 before 3.2.13; from 4.0 before 4.0.4
- debian debian_linux: 9.0; 11.0
- django (Bitnami): from 2.2.0 before 2.2.28; from 3.2.0 before 3.2.13; from 4.0.0 before 4.0.4

## Every score

- GitHub: 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`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: 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`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://groups.google.com/forum/#%21forum/django-announce> (web)
- <https://docs.djangoproject.com/en/4.0/releases/security/> (advisory, patch, vendor-advisory, web)
- <http://www.openwall.com/lists/oss-security/2022/04/11/1> (advisory, mailing-list, patch, third-party-advisory, web)
- <https://www.djangoproject.com/weblog/2022/apr/11/security-releases/> (advisory, article, patch, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/04/msg00013.html> (advisory, mailing-list, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220609-0002/> (advisory, third-party-advisory)
- <https://www.debian.org/security/2022/dsa-5254> (advisory, third-party-advisory, vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-28346> (advisory, web)
- <https://github.com/django/django/commit/2044dac5c6968441be6f534c4139bcf48c5c7e48> (web)
- <https://github.com/django/django/commit/2c09e68ec911919360d5f8502cefc312f9e03c5d> (web)
- <https://github.com/django/django/commit/800828887a0509ad1162d6d407e94d8de7eafc60> (web)
- <https://github.com/django/django/commit/93cae5cb2f9a4ef1514cf1a41f714fef08005200> (web)
- <https://docs.djangoproject.com/en/4.0/releases/security> (web)
- <https://github.com/advisories/GHSA-2gwj-7jmv-h26r> (advisory)
- <https://github.com/django/django> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-190.yaml> (web)
- <https://groups.google.com/forum/#!forum/django-announce> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI> (web)
- <https://security.netapp.com/advisory/ntap-20220609-0002> (web)
- <https://www.djangoproject.com/weblog/2022/apr/11/security-releases> (web)

## Sources

- CVE List: [CVE-2022-28346](https://www.cve.org/CVERecord?id=CVE-2022-28346), CVE Terms of Use, modified 2025-02-13
- GitHub Advisory Database: [GHSA-2gwj-7jmv-h26r](https://github.com/advisories/GHSA-2gwj-7jmv-h26r), CC-BY-4.0, modified 2025-02-21
- NVD: [CVE-2022-28346](https://nvd.nist.gov/vuln/detail/CVE-2022-28346), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-190](https://osv.dev/vulnerability/PYSEC-2022-190), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-DJANGO-2022-28346](https://osv.dev/vulnerability/BIT-DJANGO-2022-28346), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-28346 · Whole record: https://cve.day/CVE-2022-28346.json · Rebuilt by cve.day 2026-11-25T22:58:10.547Z
