CVE-2025-13372 Potential SQL injection in FilteredRelation column aliases on PostgreSQL
MediumCVSS 4.3
EPSS 0.93%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebianRed Hat
Description
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.
Upgrade path
28 packages: 11 fixed, 17 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/ansible-automation-platform-24/de-minimal-rhel8(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-24/de-minimal-rhel9(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-24/lightspeed-rhel8(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-25/de-minimal-rhel8(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-25/de-minimal-rhel9(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-25/lightspeed-rhel8(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-26/de-minimal-rhel9(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform-26/lightspeed-rhel9(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/automation-controller(Red Hat ansible_automation_platform 2) | All versions | No fix listed | No fix yet |
| redhat/discovery/discovery-server-rhel9(Red Hat discovery 2 el8) | All versions | No fix listed | No fix yet |
| redhat/openshift-service-mesh/istio-cni-rhel9(Red Hat service_mesh 3) | All versions | No fix listed | No fix yet |
| redhat/openshift-service-mesh/pilot-rhel8(Red Hat service_mesh 2) | All versions | No fix listed | No fix yet |
| redhat/rhoso/openstack-horizon-rhel9(Red Hat openstack 18.0) | All versions | No fix listed | No fix yet |
| redhat/rhosp-rhel8/openstack-horizon(Red Hat openstack 16.2) | All versions | No fix listed | No fix yet |
| redhat/rhosp-rhel9/openstack-horizon(Red Hat openstack 17.1) | All versions | No fix listed | No fix yet |
| redhat/rhosp13/openstack-horizon(Red Hat openstack 13) | All versions | No fix listed | No fix yet |
| redhat/satellite/iop-advisor-backend-rhel9(Red Hat satellite 6) | All versions | No fix listed | No fix yet |
| alpine/py3-django(Alpine v3.22) | < 4.2.27-r0 | 4.2.27-r0 | Fixed |
| alpine/py3-django(Alpine v3.23) | < 4.2.27-r0 | 4.2.27-r0 | Fixed |
| alpine/py3-django(Alpine v3.24) | < 4.2.27-r0 | 4.2.27-r0 | Fixed |
| debian/python-django(Debian 12) | < 3:3.2.25-0+deb12u1; = 3:3.2.19-1; = 3:3.2.19-1+deb12u1; = 3:3.2.19-1+deb12u1~bpo11+1 +4 more | 3:3.2.25-0+deb12u1 | Fixed |
| debian/python-django(Debian 13) | < 3:4.2.27-0+deb13u1; = 3:4.2.23-1; = 3:4.2.24-1; = 3:4.2.25-1 +2 more | 3:4.2.27-0+deb13u1 | Fixed |
| debian/python-django(Debian 14) | < 3:4.2.27-1; = 3:4.2.23-1; = 3:4.2.24-1; = 3:4.2.25-1 +2 more | 3:4.2.27-1 | Fixed |
| djangoproject django | >= 4.2, < 4.2.27; >= 5.1, < 5.1.15; >= 5.2, < 5.2.9 | 4.2.27, 5.1.15, 5.2.9 | Fixed |
| pypi django(PyPI) | = 4.2; = 4.2.1; = 4.2.2; = 4.2.3 +62 more | 4.2.27, 5.1.15, 5.2.9 | Fixed |
| ubuntu/python-django(Ubuntu 22.04) | < 2:3.2.12-2ubuntu1.24 | 2:3.2.12-2ubuntu1.24 | Fixed |
| ubuntu/python-django(Ubuntu 24.04) | < 3:4.2.11-1ubuntu1.13 | 3:4.2.11-1ubuntu1.13 | Fixed |
| ubuntu/python-django(Ubuntu 26.04) | < 3:5.2.9-0ubuntu1 | 3:5.2.9-0ubuntu1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi django(PyPI) | >= 5.2a1, < 5.2.9 | 5.2.9 |
| pypi django(PyPI) | = 5.2 | No fix listed |
| pypi django(PyPI) | = 5.2.1 | No fix listed |
| pypi django(PyPI) | = 5.2.2 | No fix listed |
| pypi django(PyPI) | = 5.2.3 | No fix listed |
| pypi django(PyPI) | = 5.2.4 | No fix listed |
| pypi django(PyPI) | = 5.2.5 | No fix listed |
| pypi django(PyPI) | = 5.2.6 | No fix listed |
| pypi django(PyPI) | = 5.2.7 | No fix listed |
| pypi django(PyPI) | = 5.2.8 | No fix listed |
| pypi django(PyPI) | = 5.2a1 | No fix listed |
| pypi django(PyPI) | = 5.2b1 | No fix listed |
| pypi django(PyPI) | = 5.2rc1 | No fix listed |
| pypi django(PyPI) | >= 5.1a1, < 5.1.15 | 5.1.15 |
| pypi django(PyPI) | = 5.1 | No fix listed |
| pypi django(PyPI) | = 5.1.1 | No fix listed |
| pypi django(PyPI) | = 5.1.10 | No fix listed |
| pypi django(PyPI) | = 5.1.11 | No fix listed |
| pypi django(PyPI) | = 5.1.12 | No fix listed |
| pypi django(PyPI) | = 5.1.13 | No fix listed |
| pypi django(PyPI) | = 5.1.14 | No fix listed |
| pypi django(PyPI) | = 5.1.2 | No fix listed |
| pypi django(PyPI) | = 5.1.3 | No fix listed |
| pypi django(PyPI) | = 5.1.4 | No fix listed |
| pypi django(PyPI) | = 5.1.5 | No fix listed |
Show 87 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi django(PyPI) | = 5.1.6 | No fix listed |
| pypi django(PyPI) | = 5.1.7 | No fix listed |
| pypi django(PyPI) | = 5.1.8 | No fix listed |
| pypi django(PyPI) | = 5.1.9 | No fix listed |
| pypi django(PyPI) | = 5.1a1 | No fix listed |
| pypi django(PyPI) | = 5.1b1 | No fix listed |
| pypi django(PyPI) | = 5.1rc1 | No fix listed |
| pypi django(PyPI) | >= 4.2a1, < 4.2.27 | 4.2.27 |
| pypi django(PyPI) | = 4.2 | No fix listed |
| pypi django(PyPI) | = 4.2.1 | No fix listed |
| pypi django(PyPI) | = 4.2.10 | No fix listed |
| pypi django(PyPI) | = 4.2.11 | No fix listed |
| pypi django(PyPI) | = 4.2.12 | No fix listed |
| pypi django(PyPI) | = 4.2.13 | No fix listed |
| pypi django(PyPI) | = 4.2.14 | No fix listed |
| pypi django(PyPI) | = 4.2.15 | No fix listed |
| pypi django(PyPI) | = 4.2.16 | No fix listed |
| pypi django(PyPI) | = 4.2.17 | No fix listed |
| pypi django(PyPI) | = 4.2.18 | No fix listed |
| pypi django(PyPI) | = 4.2.19 | No fix listed |
| pypi django(PyPI) | = 4.2.2 | No fix listed |
| pypi django(PyPI) | = 4.2.20 | No fix listed |
| pypi django(PyPI) | = 4.2.21 | No fix listed |
| pypi django(PyPI) | = 4.2.22 | No fix listed |
| pypi django(PyPI) | = 4.2.23 | No fix listed |
| pypi django(PyPI) | = 4.2.24 | No fix listed |
| pypi django(PyPI) | = 4.2.25 | No fix listed |
| pypi django(PyPI) | = 4.2.26 | No fix listed |
| pypi django(PyPI) | = 4.2.3 | No fix listed |
| pypi django(PyPI) | = 4.2.4 | No fix listed |
| pypi django(PyPI) | = 4.2.5 | No fix listed |
| pypi django(PyPI) | = 4.2.6 | No fix listed |
| pypi django(PyPI) | = 4.2.7 | No fix listed |
| pypi django(PyPI) | = 4.2.8 | No fix listed |
| pypi django(PyPI) | = 4.2.9 | No fix listed |
| pypi django(PyPI) | = 4.2a1 | No fix listed |
| pypi django(PyPI) | = 4.2b1 | No fix listed |
| pypi django(PyPI) | = 4.2rc1 | No fix listed |
| pypi django(PyPI) | >= 4.2, < 4.2.27 | 4.2.27 |
| pypi django(PyPI) | >= 5.1, < 5.1.15 | 5.1.15 |
| pypi django(PyPI) | >= 5.2, < 5.2.9 | 5.2.9 |
| debian/python-django(Debian:12) | < 3:3.2.25-0+deb12u1 | 3:3.2.25-0+deb12u1 |
| debian/python-django(Debian:12) | = 3:3.2.19-1 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.19-1+deb12u1 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.19-1+deb12u1~bpo11+1 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.19-1+deb12u2 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.20-1 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.20-1.1 | No fix listed |
| debian/python-django(Debian:12) | = 3:3.2.21-1 | No fix listed |
| debian/python-django(Debian:13) | < 3:4.2.27-0+deb13u1 | 3:4.2.27-0+deb13u1 |
| debian/python-django(Debian:13) | = 3:4.2.23-1 | No fix listed |
| debian/python-django(Debian:13) | = 3:4.2.24-1 | No fix listed |
| debian/python-django(Debian:13) | = 3:4.2.25-1 | No fix listed |
| debian/python-django(Debian:13) | = 3:4.2.25-2 | No fix listed |
| debian/python-django(Debian:13) | = 3:4.2.26-1 | No fix listed |
| debian/python-django(Debian:14) | < 3:4.2.27-1 | 3:4.2.27-1 |
| debian/python-django(Debian:14) | = 3:4.2.23-1 | No fix listed |
| debian/python-django(Debian:14) | = 3:4.2.24-1 | No fix listed |
| debian/python-django(Debian:14) | = 3:4.2.25-1 | No fix listed |
| debian/python-django(Debian:14) | = 3:4.2.25-2 | No fix listed |
| debian/python-django(Debian:14) | = 3:4.2.26-1 | No fix listed |
| ubuntu/python-django(Ubuntu:22.04) | < 2:3.2.12-2ubuntu1.24 | 2:3.2.12-2ubuntu1.24 |
| alpine/py3-django(Alpine:v3.22) | < 4.2.27-r0 | 4.2.27-r0 |
| alpine/py3-django(Alpine:v3.23) | < 4.2.27-r0 | 4.2.27-r0 |
| alpine/py3-django(Alpine:v3.24) | < 4.2.27-r0 | 4.2.27-r0 |
| redhat/openshift-service-mesh/pilot-rhel8(Red Hat:service_mesh:2) | All versions | No fix listed |
| redhat/openshift-service-mesh/istio-cni-rhel9(Red Hat:service_mesh:3) | All versions | No fix listed |
| redhat/ansible-automation-platform-24/de-minimal-rhel8(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-24/de-minimal-rhel9(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-24/lightspeed-rhel8(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-25/de-minimal-rhel8(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-25/de-minimal-rhel9(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-25/lightspeed-rhel8(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-26/de-minimal-rhel9(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/ansible-automation-platform-26/lightspeed-rhel9(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/automation-controller(Red Hat:ansible_automation_platform:2) | All versions | No fix listed |
| redhat/discovery/discovery-server-rhel9(Red Hat:discovery:2::el8) | All versions | No fix listed |
| redhat/rhosp13/openstack-horizon(Red Hat:openstack:13) | All versions | No fix listed |
| redhat/rhosp-rhel8/openstack-horizon(Red Hat:openstack:16.2) | All versions | No fix listed |
| redhat/rhosp-rhel9/openstack-horizon(Red Hat:openstack:17.1) | All versions | No fix listed |
| redhat/rhoso/openstack-horizon-rhel9(Red Hat:openstack:18.0) | All versions | No fix listed |
| redhat/satellite/iop-advisor-backend-rhel9(Red Hat:satellite:6) | All versions | No fix listed |
| ubuntu/python-django(Ubuntu:24.04) | < 3:4.2.11-1ubuntu1.13 | 3:4.2.11-1ubuntu1.13 |
| ubuntu/python-django(Ubuntu:26.04) | < 3:5.2.9-0ubuntu1 | 3:5.2.9-0ubuntu1 |
| djangoproject django | >= 4.2, < 4.2.27 | 4.2.27 |
| djangoproject django | >= 5.1, < 5.1.15 | 5.1.15 |
| djangoproject django | >= 5.2, < 5.2.9 | 5.2.9 |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- Django security archive patch vendor-advisory
- github.com product
- github.com
- Django releases announcements mailing-list release-notes vendor-advisory
- Django security releases issued: 5.2.9, 5.1.15, and 4.2.27 patch vendor-advisory
- github.com vendor-advisory
- Debian Security Tracker CVE-2025-13372 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7903-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2418372 issue-tracking
- bugs.debian.org issue-tracking