Skip to main content
VulnerabilityPublished Updated

CVE-2026-1312: djangoproject Django · SQL Injection

Affects djangoproject DjangoSource CVE Database V5

0

Not known to be exploited · CVSS 5.4 Medium · fixed in 6.0.2 : update djangoproject Django when convenient.

Data as of 26 Oct 2026, 17:16 UTC

CVSS 3.1 base score
5.4Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.9% chance of exploitation in 30 days – higher than 59% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 6.0.2, 5.2.11, 4.2.28
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 3 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade Django and django to 6.0.2, 5.2.11 or 4.2.28.

Affected software

ProductAffectedFixed in
djangoprojectDjangoAffected
  • >=6.0 <6.0.2
Fixed in
  • 6.0.2
djangoprojectDjangoAffected
  • >=5.2 <5.2.11
Fixed in
  • 5.2.11
djangoprojectDjangoAffected
  • >=4.2 <4.2.28
Fixed in
  • 4.2.28
PyPIdjangopkg:pypi/djangoOther threatsAffected
  • <6.0.2
  • <5.2.11
  • <4.2.28
Fixed in
  • 6.0.2
  • 5.2.11
  • 4.2.28
PyPIdjangopkg:pypi/djangoOther threatsAffected
  • >=6.0 <6.0.2
  • >=5.2 <5.2.11
  • >=4.2 <4.2.28
Fixed in
  • 6.0.2
  • 5.2.11
  • 4.2.28

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Fixes are available in Django versions 6.0.2, 5.2.11, and 4.2.28. Users should upgrade to these or later versions to remediate the vulnerability. Red Hat has released security advisories and updated packages addressing this issue. Applying these official patches is the recommended mitigation. Patch status is confirmed by vendor advisories linked in the references.

Description

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.

References

Community reviews

Loading reviews…