Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2025-59681
October 01, 2025
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 Packages
https://github.com/django/django.git (GITHUB):
Affected version(s) >=5.1 <5.1.13
Fix Suggestion:
Update to version 5.1.13
https://github.com/django/django.git (GITHUB):
Affected version(s) >=5.2 <5.2.7
Fix Suggestion:
Update to version 5.2.7
https://github.com/django/django.git (GITHUB):
Affected version(s) >=4.2 <4.2.25
Fix Suggestion:
Update to version 4.2.25
django (PYTHON):
Affected version(s) >=4.2 <4.2.25
Fix Suggestion:
Update to version 4.2.25
django (PYTHON):
Affected version(s) >=5.1 <5.1.13
Fix Suggestion:
Update to version 5.1.13
django (PYTHON):
Affected version(s) >=5.2 <5.2.7
Fix Suggestion:
Update to version 5.2.7
Do you need more information?
Contact Us
CVSS v4
Base Score:
7.1
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
LOW
Vulnerable System Availability
NONE
Subsequent System Confidentiality
HIGH
Subsequent System Integrity
LOW
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.1
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
LOW
User Interaction
NONE
Scope
CHANGED
Confidentiality
HIGH
Integrity
LOW
Availability
NONE
Weakness Type (CWE)
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
EPSS
Base Score:
0.02