cve.bz

CVE-2025-59681

9.8 criticalEPSS 0.6%

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 3.1
9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.6% chance of exploitation in the next 30 days; higher than 50% of CVEs (scores of 2026-10-25)
CWE
CWE-89
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-hpr9-3m2g-3j9pPyPIdjango>=4.2 <4.2.254.2.25
GHSA-hpr9-3m2g-3j9pPyPIdjango>=5.1 <5.1.135.1.13
GHSA-hpr9-3m2g-3j9pPyPIdjango>=5.2 <5.2.75.2.7
PYSEC-2025-106PyPIdjango>=4.2 <4.2.25
>=5.1 <5.1.13
>=5.2 <5.2.7
4.2.25, 5.1.13, 5.2.7

References

Check your stackJSON