5.4

CVE-2026-1312: Potential SQL injection via QuerySet.order_by and FilteredRelation

Modified
AliasesGHSA-6426-9fv3-65x8BIT-django-2026-1312PYSEC-2026-47
Published 03-02-2026Last modified 15-07-2026

Vulnerability summary

CVE-2026-1312 is a medium (CVSS 5.4) vulnerability in djangoproject django. EPSS estimates a 0.90% chance of exploitation in the next 30 days, higher than 59.6% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.4/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.90%
0%100%
Low · -0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 14 · Related 8

Timeline

  1. 03-02-2026
    PublishedVulnerability first disclosed.
  2. 15-07-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.90%

Chance of exploitation in the next 30 days

Percentile

60%

Versus all other CVEs

30-day change

Decrease -0.01 pp

From 0.91% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard4 products
  • authentik< 2025.12.1-r2
  • authentik-fips< 2025.12.1-r2
  • awx< 24.6.1-r27
  • label-studio< 1.22.0-r3
Alpine1 product
  • py3-django< 4.2.28-r0
Debian1 product
  • python-django< 3:3.2.25-0+deb12u2 | < 3:4.2.28-0+deb13u1 | < 3:4.2.28-1
Djangoproject1 product
  • django≥ 4.2, < 4.2.28 | ≥ 5.2, < 5.2.11 | ≥ 6.0, < 6.0.2
PyPI1 product
  • django≥ 6.0a1, < 6.0.2 | ≥ 5.2a1, < 5.2.11 | ≥ 4.2a1, < 4.2.28 | ≥ 6.0, < 6.0.2
Ubuntu1 product
  • python-djangoAll versions (No fix recorded) | < 3:4.2.11-1ubuntu1.14 | < 3:5.2.4-1ubuntu2.3

6 vendors · 9 products

References

31 links
Show all 31 references