Django · Django · CVE-2024-42005
**Name of the Vulnerable Software and Affected Versions**
Django versions 4.2 through 4.2.14
Django versions 5.0 through 5.0.7
**Description**
The issue is related to SQL injection in the QuerySet.values() and values list() methods on models with a JSONField. This vulnerability can be exploited by passing a crafted JSON object key as an argument, allowing an attacker to execute arbitrary SQL queries. The estimated number of potentially affected devices worldwide is over 5.4 million services.
**Recommendations**
For Django versions 4.2 through 4.2.14, upgrade to Django 4.2.15.
For Django versions 5.0 through 5.0.7, upgrade to Django 5.0.8.
As a temporary workaround, consider restricting the use of the QuerySet.values() and values list() methods on models with a JSONField until a patch is available.