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

- Priority: **Routine**
- Reason: Not severe (CVSS 4.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-12-02 · Modified: 2025-12-02
- Aliases: GHSA-rqw2-ghq9-44m7, BIT-django-2025-13372, PYSEC-2025-104, UBUNTU-CVE-2025-13372, DEBIAN-CVE-2025-13372, CGA-39c5-q9x9-vjq7, CGA-7hxg-cgv9-397w, CGA-cx53-m3v5-7vvc, CGA-pp9c-m5q7-3pcq, ALPINE-CVE-2025-13372
- Record: https://cvemate.com/vulnerability/CVE-2025-13372 · JSON: https://cvemate.com/vulnerability/CVE-2025-13372/json

## Description

```text
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.
```

## Signals

- CVSS: 4.3 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
- EPSS: 0.926%, percentile 61.681%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine py3-django (Alpine Linux): \< 4.2.27-r0
- chainguard authentik (Chainguard): \< 2025.10.2-r2
- chainguard authentik-go-server (Chainguard): \< 2025.10.2-r2
- chainguard awx (Chainguard): \< 24.6.1-r20
- debian python-django (Debian): \< 3:3.2.25-0+deb12u1 \| \< 3:4.2.27-0+deb13u1 \| \< 3:4.2.27-1
- ubuntu python-django (Ubuntu): \< 2:2.2.12-1ubuntu0.29+esm6 \| \< 2:3.2.12-2ubuntu1.24 \| \< 3:4.2.11-1ubuntu1.13 \| \< 3:5.2.4-1ubuntu2.2 \| \< 3:5.2.9-0ubuntu1
- djangoproject django: ≥ 4.2, \< 4.2.27 \| ≥ 5.1, \< 5.1.15 \| ≥ 5.2, \< 5.2.9
- PyPI django (PyPI): ≥ 5.2a1, \< 5.2.9 \| ≥ 5.1a1, \< 5.1.15 \| ≥ 4.2a1, \< 4.2.27 \| ≥ 5.2, \< 5.2.9

## References (first 20 of 22)

- <https://docs.djangoproject.com/en/dev/releases/security/>
- <https://groups.google.com/g/django-announce>
- <https://www.djangoproject.com/weblog/2025/dec/02/security-releases/>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-13372>
- <https://github.com/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf>
- <https://github.com/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0>
- <https://github.com/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e>
- <https://github.com/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355>
- <https://github.com/django/django/commit/f997037b235f6b5c9e7c4a501491ec45f3400f3d>
- <https://docs.djangoproject.com/en/dev/releases/security>
- <https://github.com/django/django>
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-104.yaml>
- <https://www.djangoproject.com/weblog/2025/dec/02/security-releases>
- <https://github.com/advisories/GHSA-rqw2-ghq9-44m7>
- <https://ubuntu.com/security/CVE-2025-13372>
- <https://www.cve.org/CVERecord?id=CVE-2025-13372>
- <https://ubuntu.com/security/notices/USN-7903-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-13372>
- <https://github.com/django/django/>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/13xxx/CVE-2025-13372.json>

---

Data as of 2026-12-05T06:32:53.903Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
