Skip to main content
VulnerabilityPublished Updated

CVE-2024-42005: Django SQL injection vulnerability

Affects DjangoSource GCVE Database

0
Compare
Authoritative record:CVE-2024-42005· Critical 9.8

Not known to be exploited · CVSS 9.8 Critical : upgrade to 5.0.8 as a priority.

Data as of 4 Nov 2026, 17:28 UTC

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 5.0.8, 4.2.15
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 Aug 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Nov 2026.

What to do

Upgrade Django to 5.0.8; Django to 4.2.15.

Affected software

ProductAffectedFixed in
PyPIDjangoAffected
  • >=5.0 <5.0.8
Fixed in
  • 5.0.8
PyPIDjangoAffected
  • >=4.2 <4.2.15
Fixed in
  • 4.2.15

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Apply the official patches by upgrading Django to version 5.0.8 or later, or 4.2.15 or later. These versions contain fixes that address the SQL injection vulnerability in QuerySet.values() and values_list() methods. No other mitigations are indicated by the vendor advisory. Immediate upgrade is recommended to prevent exploitation.

Description

A critical SQL injection vulnerability exists in Django versions 5.0 prior to 5.0.8 and 4.2 prior to 4.2.15. The issue affects the QuerySet.values() and values_list() methods when used on models containing a JSONField. An attacker can exploit crafted JSON object keys passed as *args to inject malicious SQL via column aliases.

References

Community reviews

Loading reviews…