CVE-2025-59681

CRITICAL CVSS 3.1: 9.8 EPSS 0.66%
Updated Oct 12, 2026
Djangoproject
Parameter Value
CVSS 9.8 (CRITICAL)
Affected Versions 4.2 — 5.2.7
Fixed In 4.2.25
Type CWE-89 (SQL Injection)
Vendor Djangoproject
Public PoC No

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).

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v3.1

Weakness Type (CWE)

Vulnerable Products 3

Configuration From (including) Up to (excluding)
Djangoproject Django
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
4.2 4.2.25
Djangoproject Django
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
5.1 5.1.13
Djangoproject Django
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
5.2 5.2.7