{"schema_version":"1.9.0","id":"CVE-2026-1312","published":"2026-02-03T14:36:23.257Z","modified":"2026-08-12T03:51:40.197568269Z","aliases":["BIT-django-2026-1312","GHSA-6426-9fv3-65x8","PYSEC-2026-47"],"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:11270-1","openSUSE-SU-2026:20184-1"],"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.","affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/django/django","events":[{"introduced":"97aa3b7f08f51669e118f3af5ca91026e39664c3"},{"fixed":"20c71f6b91324cf401056c72136c14e0ec2bf7bf"},{"introduced":"9e7cc2b628fe8fd3895986af9b7fc9525034c1b0"},{"fixed":"4a96a199bbb1d3dca45ea16bf643216e179cb8bc"},{"introduced":"36b5f39d9372147f0e758f590e35ee2b2bc317dd"},{"fixed":"ba00558ddac694d92b05d12ecd2a5b7fcc1de025"}],"database_specific":{"cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"4.2"},{"fixed":"4.2.28"},{"introduced":"5.2"},{"fixed":"5.2.11"},{"introduced":"6.0"},{"fixed":"6.0.2"}],"source":"CPE_RANGE"}}],"versions":["6.0.1","5.2.10","6.0","5.2.9","5.2.8","5.2.7","5.2.6","5.2.5","5.2.4","5.2.3","5.2.2","5.2.1","5.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-1312.json"}}],"references":[{"type":"WEB","url":"https://github.com/django/django/"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-1312.json"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:14835"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:2694"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3958"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3959"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3960"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:3962"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:5970"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:5971"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:6291"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-1312"},{"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":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2436342"},{"type":"PACKAGE","url":"https://pypi.org/project/Django/"},{"type":"ARTICLE","url":"https://groups.google.com/g/django-announce"}],"database_specific":{"cna_assigner":"DSF","cwe_ids":["CWE-89"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/1xxx/CVE-2026-1312.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"}]}