CVE-2024-42005
Django vulnerability analysis and mitigation

Overview

An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. QuerySet.values() and values_list() methods on models with a JSONField are subject to SQL injection in column aliases via a crafted JSON object key as a passed *arg. The vulnerability was discovered by Eyal Gabay of EyalSec and was disclosed on August 6, 2024 (Django Security).

Technical details

The vulnerability affects the QuerySet.values() and values_list() methods specifically when used with models containing JSONField. The issue allows SQL injection attacks through column aliases when a crafted JSON object key is passed as an argument. The vulnerability has been assigned a CVSS v3.1 base score of 7.3 HIGH with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L, though CISA-ADP assessed it as CRITICAL with a score of 9.8 (NVD Database).

Impact

If exploited, this vulnerability could allow attackers to perform SQL injection attacks, potentially leading to unauthorized access to database contents, modification of data, or execution of malicious database commands. The vulnerability affects both confidentiality, integrity, and availability of the system (NVD Database).

Mitigation and workarounds

The Django team has released security patches to address this vulnerability. Users are strongly encouraged to upgrade to Django versions 5.0.8 or 4.2.15, depending on their current version. These patches have been applied to Django's main, 5.1, 5.0, and 4.2 branches (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
  • python-django
NoYesNov 05, 2025
CVE-2025-64460HIGH7.5
  • DjangoDjango
  • python-django
NoYesDec 02, 2025
CVE-2025-64458HIGH7.5
  • DjangoDjango
  • py3-django
NoYesNov 05, 2025
CVE-2025-59682MEDIUM6.5
  • DjangoDjango
  • awx
NoYesOct 01, 2025
CVE-2025-13372MEDIUM4.3
  • DjangoDjango
  • py3-django
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