{"id":"CVE-2026-1312","aliases":["BIT-django-2026-1312","GHSA-6426-9fv3-65x8","PYSEC-2026-47"],"url":"https://o3.security/vulnerability/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.","published":"2026-02-03T14:36:23.257Z","modified":"2026-07-16T03:30:57.654256745Z","cvss":{"score":5.4,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"django","fixedVersion":"6.0.2"},{"ecosystem":"PyPI","name":"django","fixedVersion":"5.2.11"},{"ecosystem":"PyPI","name":"django","fixedVersion":"4.2.28"}],"fix":null,"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-16T03:30:57.654256745Z"}}