CVE-2025-13372: Potential SQL injection in FilteredRelation column aliases on PostgreSQL

Published Dec 2, 2025
·
Updated

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.

Affected Software

7 affected componentsFixes available
Django Django<5.2.9, <5.1.15, <4.2.27
pip/Django>=4.2a1<4.2.27
4.2.27
pip/Django>=5.1a1<5.1.15
5.1.15
pip/Django>=5.2a1<5.2.9
5.2.9
djangoproject Django>=4.2<4.2.27
djangoproject Django>=5.1<5.1.15
djangoproject Django>=5.2<5.2.9

Event History

Dec 2, 2025
CVE Published
via MITRE·03:13 PM
Data Sourced
via MITRE·03:13 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·06:30 PM
Data Sourced
via GitHub·06:30 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-13372?

CVE-2025-13372 has been classified as a high-severity SQL injection vulnerability affecting specific versions of Django.

2

How do I fix CVE-2025-13372?

To mitigate CVE-2025-13372, upgrade Django to version 5.2.9, 5.1.15, or 4.2.27 or later.

3

What versions of Django are affected by CVE-2025-13372?

CVE-2025-13372 affects Django versions before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.

4

What type of vulnerability is CVE-2025-13372?

CVE-2025-13372 is an SQL injection vulnerability that occurs in the FilteredRelation due to improper handling of column aliases.

5

Can CVE-2025-13372 lead to unauthorized data access?

Yes, CVE-2025-13372 can potentially allow attackers to execute arbitrary SQL commands, leading to unauthorized data access.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203