What’s Vulnerable › Vulnerabilities
CVE-2025-59681
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-10-01 · updated 2026-10-12
- Weakness: CWE-89
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).
Affected products
- Django: from 4.2 before 4.2.25; from 5.1 before 5.1.13; from 5.2 before 5.2.7 — fixed in 4.2.25, 5.1.13, 5.2.7
How to fix
Upgrade to a fixed version: Django 4.2.25, 5.1.13, 5.2.7. Check the vendor advisory for mitigations.
References
- https://docs.djangoproject.com/en/dev/releases/security/
- https://groups.google.com/g/django-announce
- https://www.djangoproject.com/weblog/2025/oct/01/security-releases/
- http://www.openwall.com/lists/oss-security/2025/10/01/3
Get alerted when CVE-2025-59681 or the next vulnerability affects your stack