CVE-2022-28347
Django vulnerability analysis and mitigation

Overview

A SQL injection vulnerability (CVE-2022-28347) was discovered in Django's QuerySet.explain() method affecting versions 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. The vulnerability was disclosed on April 11, 2022. The issue occurs when passing a crafted dictionary with dictionary expansion as the **options argument, allowing an attacker to place an injection payload in an option name (Django Security, NVD).

Technical details

The vulnerability exists in the QuerySet.explain() method specifically when used with PostgreSQL. It allows SQL injection through option names when using dictionary expansion with the **options argument. The severity of this vulnerability is rated as CRITICAL with a CVSS v3.1 Base Score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The vulnerability is classified as CWE-89: Improper Neutralization of Special Elements used in an SQL Command (NVD).

Impact

The successful exploitation of this vulnerability could lead to unauthorized access to or modification of database data, potentially exposing sensitive information or allowing manipulation of the database content. Given the CVSS score of 9.8, this vulnerability could result in a complete compromise of system confidentiality, integrity, and availability (NVD).

Mitigation and workarounds

The vulnerability has been patched in Django versions 2.2.28, 3.2.13, and 4.0.4. Users are strongly encouraged to upgrade to these or later versions. The fixes have been applied to Django's main branch and the respective release branches. For Django 2.2 users, it's recommended to upgrade to Django 3.2 or later as version 2.2 has reached the end of extended support (Django Security).

Community reactions

The Django team classified this vulnerability as 'high' severity according to their security policy. The vulnerability was discovered and reported by Mariusz Felisiak, demonstrating the active security research within the Django community (Django 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