CVE-2025-59681
QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and…
Does this matter?
High impact if exploited, but EPSS currently rates exploitation as unlikely (0.63%). Schedule it in the normal patch cycle and watch for a rise in EPSS or a public exploit.
Description
An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and MariaDB).
- CVSS 3.1
- 9.8 CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 0.63% probability · 48th percentile
- CISA KEV
- Not listed
- Weakness
- CWE-89
- Affected
- djangoproject/django
- Source
- cve@mitre.org
References
- https://docs.djangoproject.com/en/dev/releases/security/Vendor Advisory
- https://groups.google.com/g/django-announceRelease Notes, Vendor Advisory
- https://www.djangoproject.com/weblog/2025/oct/01/security-releases/Release Notes, Vendor Advisory
- http://www.openwall.com/lists/oss-security/2025/10/01/3
Source: NVD record, EPSS from FIRST.org, KEV from CISA. Refreshed daily.