SQL Injection in Djangoproject Django
CVE-2022-28346
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.
Vulnerability class: SQL Injection
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.187, 97.3th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Djangoproject Django
- Debian Linux — versions 9.0, 11.0
Weakness classification (CWE)
Public exploits and proof-of-concept code
7 public repositories with exploit or proof-of-concept code for this CVE:
- DeEpinGh0st/CVE-2022-28346 (24 stars, last pushed 2022-05-31): Django QuerySet.annotate(), aggregate(), extra() SQL 注入
- YouGina/CVE-2022-28346 (2 stars, last pushed 2022-04-25): SQL injection in QuerySet.annotate(), aggregate(), and extra()
- kamal-marouane/CVE-2022-28346 (1 star, last pushed 2024-01-19): A flaw was found in the Django package, which leads to a SQL injection. This flaw allows an attacker using a crafted dictionary containing malicious SQL queries to compromise the database completely.
- vincentinttsh/CVE-2022-28346 (last pushed 2022-05-15): 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…
- ahsentekd/CVE-2022-28346
- ahsentekdemir/CVE-2022-28346
- pthlong9991/CVE-2022-28346
Also mentioned in 23 other repositories (20142995/nuclei-templates, ARPSyndicate/cvemon, carlosatFroom/vuln_scanner_python, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- groups.google.com/forum/
- docs.djangoproject.com/en/4.0/releases/security/ (Patch, Vendor Advisory)
- www.openwall.com/lists/oss-security/2022/04/11/1 (Patch, Mailing List, Third Party Advisory)
- www.djangoproject.com/weblog/2022/apr/11/security-releases/ (Patch, Vendor Advisory)
- [debian-lts-announce] 20220414 [SECURITY] [DLA 2982-1] python-django security update (mailing-list, Mailing List, Third Party Advisory)
- security.netapp.com/advisory/ntap-20220609-0002/ (Third Party Advisory)
- DSA-5254 (vendor-advisory, Third Party Advisory)
- FEDORA-2023-8fed428c5e (vendor-advisory)
- FEDORA-2023-a53ab7c969 (vendor-advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.