CVE-2026-1287 Details
Description
An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. `FilteredRelation` is subject to SQL injection in column aliases via control characters, using a suitably crafted dictionary, with dictionary expansion, as the `**kwargs` passed to `QuerySet` methods `annotate()`, `aggregate()`, `extra()`, `values()`, `values_list()`, and `alias()`. 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 Solomon Kebede for reporting this issue.
A SQL injection vulnerability has been identified in Django versions 6.0 prior to 6.0.2, 5.2 prior to 5.2.11, and 4.2 prior to 4.2.28. The issue arises in the `FilteredRelation` class, where control characters in column aliases can be exploited to inject SQL. This vulnerability is triggered by using a specially crafted dictionary, with dictionary expansion, as the `**kwargs` for `QuerySet` methods such as `annotate()`, `aggregate()`, `extra()`, `values()`, `values_list()`, and `alias()`. Although earlier unsupported Django versions may also be affected, this vulnerability has been addressed in the latest patch releases of the affected versions.
Users can upgrade to Django 6.0.2, 5.2.11, or 4.2.28 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | redhat-SADP |
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | Django Software Foundation |
Affected Products
| Product | Versions |
|---|---|
| djangoproject django | >= 4.2, < 4.2.28 >= 5.2, < 5.2.11 >= 6.0, < 6.0.2 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | Django Software Foundation |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 4, 2026 | Initial Analysis | [email protected] |
| Feb 3, 2026 | CVE Modified | CISA-ADP |
| Feb 3, 2026 | New CVE Received | Django Software Foundation |