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.
History

Wed, 03 Dec 2025 12:15:00 +0000

Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject django
Vendors & Products Djangoproject
Djangoproject django

Tue, 02 Dec 2025 16:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 02 Dec 2025 15:30:00 +0000

Type Values Removed Values Added
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.
Title Potential SQL injection in FilteredRelation column aliases on PostgreSQL
Weaknesses CWE-89
References

cve-icon MITRE

Status: PUBLISHED

Assigner: DSF

Published: 2025-12-02T15:13:35.692Z

Updated: 2025-12-02T15:43:47.127Z

Reserved: 2025-11-18T18:34:58.688Z

Link: CVE-2025-13372

cve-icon Vulnrichment

Updated: 2025-12-02T15:43:42.505Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2025-12-02T16:15:53.907

Modified: 2025-12-02T17:16:29.163

Link: CVE-2025-13372

cve-icon Redhat

No data.