CVE-2025-59681: Djangoproject Django SQL Injection

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).
Severity Level
HIGH(7.1)
Published Date
Oct 1, 2025
Last Modified
Oct 12, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.66%Probability
Root Weakness (CWE)
Improper neutralization of special elements used in an SQL command, allowing attackers to modify queries.
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:N
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredLow
User InteractionNone
ScopeChanged
ConfidentialityHigh
IntegrityLow
AvailabilityNone

Affected & Patched Versions

Affected 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
Patched Versions
  • 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.

  1. Check whether you run Djangoproject Django and which version.
  2. 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 alerts

Data last checked: Dec 2, 2026 10:11 UTC