VDB

CVE-2025-13372

CVE-2025-13372 PUBLISHED CVSS 4.3 MEDIUM

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.

PackageEcosystemFixed in
djangoPyPI5.2.9, 5.1.15, 4.2.27
authentikChainguard2025.10.2-r2
py3-djangoAlpine4.2.27-r0
awxChainguard24.6.1-r20
djangoBitnami5.2.9, 5.1.15, 4.2.27
djangodjangoproject5.2.9, 5.1.15, 4.2.27
djangoBitnami5.2.9, 5.1.15, 4.2.27

Risk scores

CVSS 3.1
4.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Affected products

VendorProductVersions
djangoprojectDjango5.2, 5.2.9, 5.1
djangoprojectDjango5.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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›