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

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.

Published: 2025-12-02 Last update: 2025-12-12 Assigner: 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92 Source: 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92

Conclusion & alert: CVE-2025-13372 is rated Low Risk (36.9/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.87%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-13372

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.01% 0.87% +0.86%
2 2025-12-03 0.01%

Full EPSS history (2 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-13372

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 1.4 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2025-13372

GitHub Security Advisory for CVE-2025-13372

GHSA-rqw2-ghq9-44m7 · Severity: medium · Ecosystem: pip — Django is vulnerable to SQL injection in column aliases

OS Trackers for CVE-2025-13372

vendor priority summary link
alpine CVE-2025-13372: 1 source package rows (py3-django); 3 state rows across 3 repos (3.22-community, 3.23-community, edge-community); fixed 3, open 0. https://security.alpinelinux.org/vuln/CVE-2025-13372
debian unimportant CVE-2025-13372 unimportant priority: Debian including 1 source packages (python-django), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2025-13372
redhat medium https://access.redhat.com/security/cve/CVE-2025-13372
suse high CVE-2025-13372 severity important: SUSE including 11 source package names (python3-Django-2.2.28-bp156.27.1, python311-Django-4.2.11-150600.3.44.1, …), 14 product×package rows across 6 product lines (SUSE Linux Enterprise Module for Package Hub 15 SP6, SUSE Linux Enterprise Module for Package Hub 15 SP7, … (6 product lines)): Fixed 14. https://www.suse.com/security/cve/CVE-2025-13372/
ubuntu medium CVE-2025-13372 medium priority: Ubuntu including 1 source packages (python-django), 9 status rows across 9 suites (bionic, focal, jammy, noble, plucky, questing, trusty, upstream, xenial): released 5, not-affected 3, needs-triage 1. https://ubuntu.com/security/CVE-2025-13372

Affected software / configurations for CVE-2025-13372

Vendor Product Version Raw CPE
djangoproject django >= 4.2, < 4.2.27 cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
djangoproject django >= 5.1, < 5.1.15 cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*
djangoproject django >= 5.2, < 5.2.9 cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*

References for CVE-2025-13372

cvelogic Threat Intelligence