CVE-2025-13372 json
Potential SQL injection in FilteredRelation column aliases on PostgreSQL
published 2025-12-02 11 mo ago modified 2026-10-18 21 d ago also BIT-django-2025-13372 , EUVD-2025-200249 , GHSA-rqw2-ghq9-44m7 , PYSEC-2025-104
- cvss
- 4.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 60%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi django 4.2.27, 5.1.15, 5.2.9
- bitnami django 4.2.27, 5.1.15, 5.2.9
- djangoproject Django 4.2.27, 5.1.15, 5.2.9
- python-django Debian 12 3:3.2.25-0+deb12u1
- python-django Debian 13 3:4.2.27-0+deb13u1
- python-django Debian 14 3:4.2.27-1
debian advisories DEBIAN-CVE-2025-13372
- python-django Ubuntu 22.04 LTS 2:3.2.12-2ubuntu1.24
- python-django Ubuntu 24.04 LTS 3:4.2.11-1ubuntu1.13
- python-django Ubuntu 25.10 3:5.2.4-1ubuntu2.2
- python-django Ubuntu 26.04 LTS 3:5.2.9-0ubuntu1
- python-django Ubuntu Pro 20.04 LTS 2:2.2.12-1ubuntu0.29+esm6
ubuntu advisories UBUNTU-CVE-2025-13372
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-Django SLE Module for Package Hub 15 SP7, SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6 4.2.11-150600.3.44.1
suse advisories SUSE-SU-2025:4384-1
- python-Django5 openSUSE Tumbleweed 5.2.16-1.1
- python-Django6 openSUSE Tumbleweed 6.0-1.1
- python-Django openSUSE Leap 16.0 5.2.4-bp160.4.1
- python-Django openSUSE Tumbleweed 5.2.9-1.1
- python-Django4 openSUSE Tumbleweed 4.2.27-1.1
opensuse advisories openSUSE-SU-2026:11270-1openSUSE-SU-2026:10005-1openSUSE-SU-2025:20153-1openSUSE-SU-2025:15805-1openSUSE-SU-2025:15806-1
- py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 4.2.27-r0
alpine advisories ALPINE-CVE-2025-13372
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/django/django@479415c commit
- github.com/django/django@56aea00 commit
- github.com/django/django@5b90ca1 commit
- github.com/django/django@9c6a5bd commit
- github.com/django/django@f997037 commit
- docs.djangoproject.com/en/dev/releases/security/ advisory
- djangoproject.com/weblog/2025/dec/02/security-releases/ advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-13372 updated cvss 4.3
django: Django: SQL injection in FilteredRelation column aliases
-
Red Hat OpenShift Service Mesh 2 openshift-service-mesh/pilot-rhel8 Red Hat OpenShift Service Mesh 3 openshift-service-mesh/istio-cni-rhel9 Red Hat Ansible Automation Platform 2 automation-controller, ansible-automation-platform-24/de-minimal-rhel8, ansible-automation-platform-24/de-minimal-rhel9, ansible-automation-platform-24/lightspeed-rhel8, ansible-automation-platform-25/de-minimal-rhel8, ansible-automation-platform-25/de-minimal-rhel9, +3 more Red Hat Discovery 2 discovery/discovery-server-rhel9 Red Hat OpenStack Platform 13 (Queens) rhosp13/openstack-horizon Red Hat OpenStack Platform 16.2 rhosp-rhel8/openstack-horizonaffected: workaround, no fix available “Fix deferred”
+3 more productsfewer
Red Hat OpenStack Platform 17.1 rhosp-rhel9/openstack-horizon Red Hat OpenStack Platform 18.0 rhoso/openstack-horizon-rhel9 Red Hat Satellite 6 satellite/iop-advisor-backend-rhel9
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 11 mo ago
Exploit prediction
0.93% chance of exploitation in the next 30 days, higher than 60% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| CNA | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| OSV | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | django | >=5.2a1, <5.2.9 >=5.1a1, <5.1.15 >=4.2a1, <4.2.27 >=4.2, <4.2.27 >=5.1, <5.1.15 >=5.2, <5.2.9 |
5.2.9 5.1.15 4.2.27 |
| bitnami | django | >=4.2.0, <4.2.27 >=5.1.0, <5.1.15 >=5.2.0, <5.2.9 |
4.2.27 5.1.15 5.2.9 |
Affected products
- djangoproject Django
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
docs.djangoproject.com
/en/dev/releases/security/
vendor-advisory, patch, advisory
-
djangoproject.com
/weblog/2025/dec/02/security-releases/
vendor-advisory, patch, advisory
-
github.com
/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf
web
-
github.com
/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0
web
-
github.com
/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e
web
-
github.com
/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355
web
-
github.com
/django/django/commit/f997037b235f6b5c9e7c4a501491ec45f3400f3d
web
-
groups.google.com
/g/django-announce
mailing-list, web, release-notes, discussion, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-13372
advisory, web
-
docs.djangoproject.com
/en/dev/releases/security
web
-
github.com
/django/django
package
-
github.com
/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-104.yaml
web
-
djangoproject.com
/weblog/2025/dec/02/security-releases
web
-
github.com
/advisories/GHSA-rqw2-ghq9-44m7
advisory
Sources
- CVE List CVE-2025-13372
- GitHub Advisory GHSA-rqw2-ghq9-44m7
- NVD CVE-2025-13372
- OSV BIT-django-2025-13372
- OSV PYSEC-2025-104
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.