CVE-2025-59681
NVDCVSS scored by cve@mitre.org
Vulnerability Summary
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 v3.1 Base Metrics — Score 7.1 (HIGH)
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:NAttack VectorNetwork
Attack ComplexityHigh
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityHigh
IntegrityLow
AvailabilityNone
Affected & Patched Versions
- Djangoproject Django >= 4.2 and < 4.2.25
- Djangoproject Django >= 5.1 and < 5.1.13
- Djangoproject Django >= 5.2 and < 5.2.7
- djangoproject Django >= 4.2 and < 4.2.25
- djangoproject Django >= 5.1 and < 5.1.13
- djangoproject Django >= 5.2 and < 5.2.7
- Djangoproject Django 4.2.25
- Djangoproject Django 5.1.13
- Djangoproject Django 5.2.7
- djangoproject Django 4.2.25
- djangoproject Django 5.1.13
- djangoproject Django 5.2.7
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run Djangoproject Django and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Oct 1, 2025Published
- Oct 12, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Djangoproject Django CVEsYou are reading CVE-2025-59681. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Dec 2, 2026 10:11 UTC