{"id":"CVE-2026-1312","summary":"Potential SQL injection via QuerySet.order_by and FilteredRelation","details":"An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.\n`.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`.\nEarlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\nDjango would like to thank Solomon Kebede for reporting this issue.","aliases":["BIT-django-2026-1312","GHSA-6426-9fv3-65x8","PYSEC-2026-47"],"modified":"2026-05-28T03:53:56.039843099Z","published":"2026-02-03T14:36:23.257Z","related":["CGA-rp2j-r5m6-5p6g","SUSE-SU-2026:0440-1","openSUSE-SU-2026:10145-1","openSUSE-SU-2026:10160-1","openSUSE-SU-2026:10247-1","openSUSE-SU-2026:20184-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1312.json","cwe_ids":["CWE-89"],"cna_assigner":"DSF"},"references":[{"type":"WEB","url":"https://github.com/django/django/"},{"type":"ADVISORY","url":"https://docs.djangoproject.com/en/dev/releases/security/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1312.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-1312"},{"type":"ADVISORY","url":"https://www.djangoproject.com/weblog/2026/feb/03/security-releases/"},{"type":"PACKAGE","url":"https://pypi.org/project/Django/"},{"type":"ARTICLE","url":"https://groups.google.com/g/django-announce"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/django/django","events":[{"introduced":"97aa3b7f08f51669e118f3af5ca91026e39664c3"},{"fixed":"20c71f6b91324cf401056c72136c14e0ec2bf7bf"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-1312.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"}]}