CVE Catalog

CVE-2025-59681

HighCVSS 7.1
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.63%

48th percentile - higher than 48% of all known CVEs

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

Risk Assessment

An attacker can inject malicious SQL code, which can lead to unauthorized access, modification, or deletion of data. The vulnerability can be exploited to take control of the database and the entire system.

Recommendation

Immediately upgrade Django to version 4.2.25, 5.1.13, or 5.2.7, depending on the branch used. Also, review application code for the use of vulnerable methods with unsafe arguments.

Other vulnerabilities in Django

See all
Original NVD description (English source)

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

Vulnerability data from NVD (NIST) · CISA KEV · EPSS