CVE-2025-13372

Potential SQL injection in FilteredRelation column aliases on PostgreSQL

MEDIUM
4.3
CVSS Score
Published: December 2, 2025 at 03:13 PM UTC
Updated: October 18, 2026 at 06:10 PM UTC
1 product affected across 1 vendorDjango

Using Django by djangoproject?

Get instant alerts when new vulnerabilities affect Django - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.3
Exploit prediction
EPSS 0.9%
SSVC
No known exploit

Description

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

All versions4.2 ≤ v < 4.2.275.1 ≤ v < 5.1.155.2 ≤ v < 5.2.94.25.15.2
Vendor states this is fixed in 4.2.27 (unaffected)
Vendor states this is fixed in 5.1.15 (unaffected)
Vendor states this is fixed in 5.2.9 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

Mailing ListRelease Notes
Source: cverecord
https://groups.google.com/g/django-announce

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.3MEDIUMCISA-ADP
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-89

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card