CVE-2025-13372
Potential SQL injection in FilteredRelation column aliases on PostgreSQL
Reported by dsf · Published December 2, 2025
django is fixed in 5.2.9, 5.1.15 and 4.2.27 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| django | PyPI | 5.2.9, 5.1.15, 4.2.27 |
| authentik | Chainguard | 2025.10.2-r2 |
| py3-django | Alpine | 4.2.27-r0 |
| awx | Chainguard | 24.6.1-r20 |
| django | Bitnami | 5.2.9, 5.1.15, 4.2.27 |
| django | djangoproject | 5.2.9, 5.1.15, 4.2.27 |
| django | Bitnami | 5.2.9, 5.1.15, 4.2.27 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | Django | 5.2, 5.2.9, 5.1 |
| djangoproject | Django | 5.2, 5.2.9, 5.1 |
Timeline
- Dec 2, 2025 CVE Published
- Dec 2, 2025 PoC Published (7 in total, the first dated here)
- Dec 3, 2025 EPSS Score (30 in total, the first dated here)
- Feb 4, 2026 CVE Updated
- Mar 9, 2026 Security Advisory (11 in total, the first dated here)
- Jun 23, 2026 Coalition ESS Score
- Oct 10, 2026 Distribution Patch (6 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-13372
vulnetix vdb fixes CVE-2025-13372
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-13372/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- Django security releases issued: 5.2.9, 5.1.15, and 4.2.27 vendor-advisory