CVE-2026-1312

NameCVE-2026-1312
DescriptionAn 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1126914

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-django (PTS)bullseye2:2.2.28-1~deb11u2vulnerable
bullseye (security)2:2.2.28-1~deb11u11vulnerable
bookworm, bookworm (security)3:3.2.19-1+deb12u1vulnerable
trixie3:4.2.23-1vulnerable
trixie (security)3:4.2.27-0+deb13u1vulnerable
forky, sid3:4.2.27-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-djangosource(unstable)(unfixed)1126914

Notes

https://www.djangoproject.com/weblog/2026/feb/03/security-releases/
Fixed by: https://github.com/django/django/commit/90f5b10784ba5bf369caed87640e2b4394ea3314 (4.2.28)

Search for package or bug name: Reporting problems