CVE-2022-28346
Django vulnerability analysis and mitigation

Overview

A critical SQL injection vulnerability (CVE-2022-28346) was discovered in Django versions 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. The vulnerability affects the QuerySet.annotate(), aggregate(), and extra() methods, which were susceptible to SQL injection attacks in column aliases when using a crafted dictionary with dictionary expansion as the passed **kwargs (Django Security, NVD).

Technical details

The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The issue specifically involves the way Django's QuerySet methods handle dictionary expansion in their kwargs parameters, allowing malicious actors to inject SQL commands through column aliases (NetApp Advisory).

Impact

Successful exploitation of this vulnerability could lead to unauthorized disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The high severity rating indicates the potential for complete compromise of system confidentiality, integrity, and availability (NetApp Advisory).

Mitigation and workarounds

The Django team has released security patches to address this vulnerability in versions 4.0.4, 3.2.13, and 2.2.28. Users are strongly encouraged to upgrade to these patched versions immediately. Django 2.2 users should note that version 2.2.28 was the final security release for that branch, and they are encouraged to upgrade to Django 3.2 or later (Django Security).

Community reactions

The vulnerability was responsibly disclosed by the Splunk team members Preston Elder, Jacob Davis, Jacob Moore, Matt Hanson, David Briggs, and security researcher Danylo Dmytriiev (DDV_UA). Multiple vendors and distributions including Debian, Fedora, and NetApp have issued security advisories and patches for their products (Django Security, Debian Security).

Additional resources


SourceThis report was generated using AI

Related Django vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-64459CRITICAL9.1
  • DjangoDjango
  • python3-django-doc
NoYesNov 05, 2025
CVE-2025-64460HIGH7.5
  • DjangoDjango
  • python313-Django
NoYesDec 02, 2025
CVE-2025-64458HIGH7.5
  • DjangoDjango
  • py3-django
NoYesNov 05, 2025
CVE-2025-59682MEDIUM6.5
  • DjangoDjango
  • python-django4.2-bash-completion
NoYesOct 01, 2025
CVE-2025-13372MEDIUM4.3
  • DjangoDjango
  • python-django4.2-bash-completion
NoYesDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management