CVE-2026-1312Djangoproject Django SQL Injection
NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Vulnerability Summary
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.
`.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.
CVSS v3.1 Base Metrics — Score 5.4 (MEDIUM)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:NAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityLow
IntegrityLow
AvailabilityNone
Affected & Patched Versions
- Djangoproject Django >= 4.2 and < 4.2.28
- Djangoproject Django >= 5.2 and < 5.2.11
- Djangoproject Django >= 6.0 and < 6.0.2
- Djangoproject Django 4.2.28
- Djangoproject Django 5.2.11
- Djangoproject Django 6.0.2
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run Djangoproject Django and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Feb 3, 2026Published
- Jun 30, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Djangoproject Django CVEsYou are reading CVE-2026-1312. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsRelated Coverage
External References
- Patchhttps://docs.djangoproject.com/en/dev/releases/security/
- Referencehttps://groups.google.com/g/django-announce
- Patchhttps://www.djangoproject.com/weblog/2026/feb/03/security-releases/
- Referencehttps://access.redhat.com/errata/RHSA-2026:14835
- Referencehttps://access.redhat.com/errata/RHSA-2026:2694
- Referencehttps://access.redhat.com/errata/RHSA-2026:3958
- Referencehttps://access.redhat.com/errata/RHSA-2026:3959
- Referencehttps://access.redhat.com/errata/RHSA-2026:3960
- Referencehttps://access.redhat.com/errata/RHSA-2026:3962
- Referencehttps://access.redhat.com/errata/RHSA-2026:5970
- Referencehttps://access.redhat.com/errata/RHSA-2026:5971
- Referencehttps://access.redhat.com/errata/RHSA-2026:6291
- Vendor Advisoryhttps://access.redhat.com/security/cve/CVE-2026-1312
- Issue Trackinghttps://bugzilla.redhat.com/show_bug.cgi?id=2436342
- Referencehttps://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-1312.json
Data last checked: Nov 15, 2026 03:31 UTC