CVE Catalog

CVE-2025-13372

MediumCVSS 4.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Elevated risk
0.92%

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

Summary

A vulnerability in Django involves SQL injection in column aliases using a suitably crafted dictionary with dictionary expansion as the **kwargs passed to QuerySet.annotate() or QuerySet.alias() on PostgreSQL. It affects versions 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.

Risk Assessment

An attacker could execute arbitrary SQL queries, potentially leading to data leakage or database modification.

Recommendation

Update Django to version 5.2.9, 5.1.15, or 4.2.27 (or later). Avoid using unvalidated input in annotate() and alias().

Other vulnerabilities in Django

See all
Original NVD description (English source)

An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27. `FilteredRelation` is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the `**kwargs` passed to `QuerySet.annotate()` or `QuerySet.alias()` on PostgreSQL. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Stackered for reporting this issue.

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