CVE-2026-1312 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. `.QuerySet.order_by()` is subject to SQL injection in column aliases containing periods when the same alias is, using a suitably crafted dictionary, with dictionary expansion, used in `FilteredRelation`. 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 QuerySet.order_by() method when column aliases containing periods are used. If the same alias is then applied in a FilteredRelation using a crafted dictionary with dictionary expansion, it can lead to SQL injection. While this vulnerability has been assessed in supported Django versions, earlier unsupported series may also be affected.
Users can upgrade to Django 6.0.2, 5.2.11, or 4.2.28, where this vulnerability has been patched.
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 |