CVE-2025-13372
published medium CVSS 3.1 · 4.3Potential SQL injection in FilteredRelation column aliases on PostgreSQL
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| djangoproject | — | djangoDjango · 5.2 to < 5.2.9 (affected · semver) · 5.2.9 (unaffected · semver) · 5.1 to < 5.1.15 (affected · semver) · 5.1.15 (unaffected · semver) · 4.2 to < 4.2.27 (affected · semver) · 4.2.27 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | DSF |
| Alpine Linux | edge | py3-django | Fixed | 4.2.27-r0 | Package fix record |
| Debian | bookworm | python-django | Advisory build | 3:3.2.25-0+deb12u1 | DSA-6136-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-Djangonoarch | Advisory build | 4.2.11-150600.3.44.1 | SUSE-SU-2025:4384-1 |
| Ubuntu | focal | python-django | Advisory build | 2:2.2.12-1ubuntu0.29+esm6 | USN-7903-1 |
| Alpine Linux | v3.22 | py3-django | Fixed | 4.2.27-r0 | Package fix record |
| Alpine Linux | v3.23 | py3-django | Fixed | 4.2.27-r0 | Package fix record |
| Alpine Linux | v3.24 | py3-django | Fixed | 4.2.27-r0 | Package fix record |
Show 51 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Debian | trixie | python-django | Advisory build | 3:4.2.27-0+deb13u1 | DSA-6117-1 |
| SUSE / openSUSE | SLE-15-SP7 | python311-Djangonoarch | Advisory build | 4.2.11-150600.3.44.1 | SUSE-SU-2025:4384-1 |
| SUSE / openSUSE | openSUSE-Leap-15.6 | python311-Djangonoarch | Advisory build | 4.2.11-150600.3.44.1 | SUSE-SU-2025:4384-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | python313-Djangonoarch | Advisory build | 5.2.4-bp160.4.1 | OPENSUSE-SU-2025:20153-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Djangoaarch64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Djangoppc64le | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Djangos390x | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Djangox86_64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Django4aarch64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Django4ppc64le | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Django4s390x | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-Django4x86_64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Djangoaarch64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Djangoppc64le | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Djangos390x | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Djangox86_64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django4aarch64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django4ppc64le | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django4s390x | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django4x86_64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django6aarch64 | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django6ppc64le | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django6s390x | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-Django6x86_64 | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangoaarch64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangoppc64le | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangos390x | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Djangox86_64 | Advisory build | 5.2.9-1.1 | OPENSUSE-SU-2025:15805-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4aarch64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4ppc64le | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4s390x | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django4x86_64 | Advisory build | 4.2.27-1.1 | OPENSUSE-SU-2025:15806-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5aarch64 | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5ppc64le | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5s390x | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django5x86_64 | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django6aarch64 | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django6ppc64le | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django6s390x | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-Django6x86_64 | Advisory build | 6.0-1.1 | OPENSUSE-SU-2026:10005-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5aarch64 | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5ppc64le | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5s390x | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-Django5x86_64 | Advisory build | 5.2.16-1.1 | OPENSUSE-SU-2026:11270-1 |
| Ubuntu | focal | python3-django | Advisory build | 2:2.2.12-1ubuntu0.29+esm6 | USN-7903-1 |
| Ubuntu | jammy | python-django | Advisory build | 2:3.2.12-2ubuntu1.24 | USN-7903-1 |
| Ubuntu | jammy | python3-django | Advisory build | 2:3.2.12-2ubuntu1.24 | USN-7903-1 |
| Ubuntu | noble | python-django | Advisory build | 3:4.2.11-1ubuntu1.13 | USN-7903-1 |
| Ubuntu | noble | python3-django | Advisory build | 3:4.2.11-1ubuntu1.13 | USN-7903-1 |
| Ubuntu | questing | python-django | Advisory build | 3:5.2.4-1ubuntu2.2 | USN-7903-1 |
| Ubuntu | questing | python3-django | Advisory build | 3:5.2.4-1ubuntu2.2 | USN-7903-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.3 / 10
- Severity
- medium
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| djangoproject | Django | 5.2 to < 5.2.9 (affected · semver)5.2.9 (unaffected · semver)5.1 to < 5.1.15 (affected · semver)5.1.15 (unaffected · semver)4.2 to < 4.2.27 (affected · semver)4.2.27 (unaffected · semver)Default: unaffected | DSF · cna |
Weaknesses
1- CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
3- Django security archive https://docs.djangoproject.com/en/dev/releases/security/
- Django releases announcements https://groups.google.com/g/django-announce
- Django security releases issued: 5.2.9, 5.1.15, and 4.2.27 https://www.djangoproject.com/weblog/2025/dec/02/security-releases/
Provider assertions
2DSF · cna
Potential SQL injection in FilteredRelation column aliases on PostgreSQL
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 312d2fa2b1caafac9d133832c29e1f0dac2fb6d6f868e38218656f6f73b60fc9
- Ingested
- 23 Sep 2026, 08:37:10 UTC
- Source record
- Official CVE record