Skip to content
Fencer Vulns
medium 4.3

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

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-horizon
    +3 more products
    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
    affected: workaround, no fix available “Fix deferred”

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

Sources

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.