CVE-2025-13372
published 2025-12-02CVE-2025-13372: 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…
PriorityP428medium4.3CVSS 3.1
AVNACLPRNUIRSUCLINAN
EPSS
0.90%
55.3th percentile
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.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | python-django | < python-django 3:3.2.25-0+deb12u1 (bookworm) | python-django 3:3.2.25-0+deb12u1 (bookworm) |
| djangoproject | django | >= 4.2 < 4.2.27 | 4.2.27 |
| djangoproject | django | >= 4.2a1 < 4.2.27 | 4.2.27 |
| djangoproject | django | >= 5.1 < 5.1.15 | 5.1.15 |
| djangoproject | django | >= 5.1a1 < 5.1.15 | 5.1.15 |
| djangoproject | django | >= 5.2 < 5.2.9 | 5.2.9 |
| djangoproject | django | >= 5.2a1 < 5.2.9 | 5.2.9 |
CVSS provenance
nvdv3.14.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
osv4.3MEDIUM
vendor_debian4.3MEDIUM
vendor_redhat4.3MEDIUM
vendor_ubuntu4.3MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Django vulnerabilities
vendor_ubuntu·2025-12-02·CVSS 4.3
CVE-2025-64460 [MEDIUM] Django vulnerabilities
Title: Django vulnerabilities
Summary: Several security issues were fixed in Django.
It was discovered that Django incorrectly handled certain characters in the
FilteredRelation object. An attacker could possibly use this issue to
execute arbitrary SQL commands. This issue only affected Ubuntu 20.04 LTS,
Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Ubuntu 25.04, and Ubuntu 25.10.
(CVE-2025-13372)
Seokchan Yoon discovered that Django inefficiently handled deserialization
of XML objects. An attacker could possibly use this issue to cause Django
to use excessive resources, causing a denial of service. (CVE-2025-64460)
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
django: Django: SQL injection in FilteredRelation column aliases
vendor_redhat·2025-12-02·CVSS 4.3
CVE-2025-13372 [MEDIUM] CWE-89 django: Django: SQL injection in FilteredRelation column aliases
django: Django: SQL injection in FilteredRelation column aliases
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.
A flaw was found in Django. This vulnerability allows Structured Query Language (SQL) injection in column aliases via a suitably crafted dictionary with dictionary expansion, as the **kwargs passed to QuerySet.annotate() or QuerySet.alias() on PostgreS
Debian
CVE-2025-13372: python-django - An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4...
vendor_debian·2025·CVSS 4.3
CVE-2025-13372 [MEDIUM] CVE-2025-13372: python-django - An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4...
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.
Scope: local
bookworm: resolved (fixed in 3:3.2.25-0+deb12u1)
bullseye: resolved
forky: resolved (fixed in 3:4.2.27-1)
sid: resolved (fixed in 3:4.2.27-1)
trixie: resolved (fixed in 3:4.2.27-0+deb13u1)
OSV
CVE-2025-13372: An issue was discovered in 5
osv·2025-12-02·CVSS 4.3
CVE-2025-13372 [MEDIUM] CVE-2025-13372: An issue was discovered in 5
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.
OSV
python-django vulnerabilities
osv·2025-12-02·CVSS 4.3
CVE-2025-13372 [MEDIUM] python-django vulnerabilities
python-django vulnerabilities
It was discovered that Django incorrectly handled certain characters in the
FilteredRelation object. An attacker could possibly use this issue to
execute arbitrary SQL commands. This issue only affected Ubuntu 20.04 LTS,
Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Ubuntu 25.04, and Ubuntu 25.10.
(CVE-2025-13372)
Seokchan Yoon discovered that Django inefficiently handled deserialization
of XML objects. An attacker could possibly use this issue to cause Django
to use excessive resources, causing a denial of service. (CVE-2025-64460)
OSV
Django is vulnerable to SQL injection in column aliases
osv·2025-12-02
CVE-2025-13372 [MEDIUM] Django is vulnerable to SQL injection in column aliases
Django is vulnerable to SQL injection in column aliases
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.
GHSA
Django is vulnerable to SQL injection in column aliases
ghsa·2025-12-02
CVE-2025-13372 [MEDIUM] CWE-89 Django is vulnerable to SQL injection in column aliases
Django is vulnerable to SQL injection in column aliases
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2025-12-02
Published