CVE-2024-42005: django · n/a
Affects djangoSource CVE Database V5
Not known to be exploited · CVSS 9.8 Critical : upgrade to 5.0.8 or 4.2.15 as a priority.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 1.5% chance of exploitation in 30 days – higher than 74% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- 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:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Aug 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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 2026-10-25.
What to do
Upgrade django to 5.0.8 or 4.2.15.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIdjangopkg:pypi/djangoOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Immediately upgrade all affected Django installations to version 5.0.8, 4.2.15, or later where the vulnerability is patched. 2. Audit all codebases for usage of QuerySet.values() and values_list() methods on models with JSONField attributes, especially where JSON keys are passed as column aliases. 3. Implement strict input validation and sanitization on JSON data before it is used in query construction to prevent injection of malicious keys. 4. Employ database query logging and monitoring to detect unusual or suspicious SQL queries that may indicate exploitation attempts. 5. Use Web Application Firewalls (WAFs) with rules designed to detect and block SQL injection patterns targeting JSONField usage in Django. 6. Conduct penetration testing focusing on injection vectors involving JSONField and ORM query methods. 7. Educate developers on secure coding practices related to ORM usage and JSON data handling. 8. Isolate critical databases and restrict database user permissions to minimize impact if exploitation occurs.
Description
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.