Skip to main content

Django EUVDEUVD-2026-141384

| CVE-2026-132092 CRITICAL
SQL Injection (CWE-89)
2026-12-02 DSF GHSA-c7wh-8726-4mmj
9.3
CVSS 4.0 · Vendor: DSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint building vulnerable range/in queryset
  2. Delivery
    Supply input with percent-sign payload
  3. Exploit
    Break placeholder/parameter balance in lookup SQL
  4. Execution
    Inject attacker-controlled SQL
  5. Impact
    Read or modify database contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Not a default-configuration flaw. Exploitation requires the application itself to construct one of two specific query shapes AND use percent signs in a column alias or key transform: (1) a __range lookup incorrectly given more than two right-hand side values, or (2) an __in lookup used together with a bilateral transform (e.g. a bilateral Lower lookup) - the JSON-field regression tests exercise key transforms such as data__x%sy. The underlying bug is an unbalanced-placeholder condition where a bilateral transform can compile to a parameter-less fragment (e.g. IS NULL), breaking the assumption that parameter count stays constant after compilation. Limiting factors: the application must be written with these non-default lookup/transform/alias patterns (percent-sign aliases and key transforms were deprecated in Django 6.0 and scheduled for removal), so a stock Django app that does not use them is not reachable; affected versions are limited to 5.2 <5.2.20, 6.0 <6.0.11, and 6.1 <6.1.4 (older unsupported series unevaluated). Updating to the fixed releases is the vendor-stated remediation.

Impact

Signals conflict in a way that matters for prioritization. Severity signals are high: CVSS 4.0 base 9.3 with AV:N/AC:L/AT:N/PR:N/UI:N and VC:H/VI:H/VA:H, CWE-89 (SQL injection), a confirmed vendor patch across three branches, and the vuln.today Decision label 'act_now' - the last of which argues against deferring remediation. Against that, exploitation-likelihood signals are either absent or dampening: there is no CISA KEV listing (so no confirmed active exploitation), no EPSS score was provided, and no public working exploit is identified. Most importantly, the vendor's own description narrows the trigger well below what PR:N/UI:N implies: the __range flaw requires the application to incorrectly pass more than two right-hand side values, the __in flaw requires a bilateral transform, and in both cases the query must involve aliases or key transforms containing percent signs. These are developer-constructed, non-default code patterns - and percent signs in column aliases and key transforms were already deprecated in Django 6.0 - so blanket, opportunistic exploitation of arbitrary Django sites is unlikely; only applications written with these specific constructs are reachable. Net assessment: patch promptly given Django's footprint and the act_now label, but recognize this is a conditional/code-pattern-dependent flaw rather than a broadly wormable one. Note the CVSS vector is CVSS 4.0 only; no CVSS 3.1 vector was supplied in the input.

Exploit ScenarioDerived

In a Django application that builds a queryset using a __range lookup with more than two RHS values, or an __in lookup with a bilateral transform, over a field whose alias or key transform contains a percent sign, an attacker supplies crafted input that is reflected into the generated SQL. Because the placeholder/parameter balance breaks, attacker-controlled text is incorporated into the query rather than bound as a parameter, enabling SQL injection against the backend database. No public working exploit is identified; the mechanism is disclosed only via the fix commits and regression tests.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Dec 02, 2026

SQL injection in Django's range and in query lookups affects 5.2 before 5.2.20, 6.0 before 6.0.11, and 6.1 before 6.1.4, allowing a crafted lookup to break out of query parameterization when the application itself builds either a __range lookup with more than two right-hand-side values or an __in lookup combined with a bilateral transform, in a query whose aliases or key transforms contain percent signs. The published CVSS 4.0 vector is 9.3 (AV:N/AC:L/PR:N/UI:N, high confidentiality/integrity/availability impact), but this is not a default-configuration flaw: reachability depends on non-default lookup, transform, and alias patterns, and percent signs in aliases and key transforms were already deprecated in Django 6.0 for removal in 2028. No public exploit code was identified in the available sources at time of analysis; the vendor has shipped fixed releases, the vuln.today decision label is act_now, and Django's own security policy rates the flaw 'high'.

Earlier versions of this analysis (1)
v1 Dec 02, 2026 - 13:46 CVSS 9.8

SQL injection can occur in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20 through the range and in lookups when a query involves aliases or key transforms containing percent signs. Exploitation is not reachable against a default Django installation: the __range case required more than two right-hand-side values, and the __in case required a registered bilateral transform that can compile to a parameter-less IS NULL, leaving placeholders and parameters unbalanced. Vendor patches are available for the supported branches and no public exploit code has been identified at time of analysis; earlier unsupported 5.1.x, 5.0.x, and 4.2.x series were not evaluated and may also be affected.

RemediationAI

Upgrade to the vendor-released fixed versions: Django 5.2.20, 6.0.11, or 6.1.4 according to your branch; the vendor presents updating as the remediation, and the patch commits are https://github.com/django/django/commit/1eb6104c5805d55fca4cd6cf9c715521934d45fc, https://github.com/django/django/commit/e0e7876984f1b0b63700e2743d6f2a3edf01e0c6, https://github.com/django/django/commit/da230e17c9d77a2801419b911772aefe2cbed4b3, and https://github.com/django/django/commit/5a8963c9fcb45dba9825e19c19c4190ca4772768. The fix enforces exactly two right-hand-side values for __range and adds a strict length check on the compiled SQL/parameter pairs in batch_process_rhs(). Because reachability depends on application code, also audit codebases for __range lookups passed more than two right-hand-side values, __in lookups combined with bilateral transforms, and any remaining use of percent signs in column aliases or key transforms - those patterns were deprecated in Django 6.0 and are scheduled for removal in Django 2028, so eliminating them removes the prerequisite condition; note that this is a code-level prerequisite reduction rather than a vendor-published workaround, and updating remains the only complete fix. Older unsupported series (5.1.x, 5.0.x, 4.2.x) were not evaluated by the vendor and should be moved to a supported, patched branch. Advisory: https://www.djangoproject.com/weblog/2026/dec/02/security-releases/ and https://docs.djangoproject.com/en/dev/releases/security/.

Affected VersionsENISA

Django 5.2 <5.2.20
Django 6.1 <6.1.4
Django 6.0 <6.0.11

Affected Packages

euvd django fix: 5.2.20, 6.0.11, 6.1.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Django's ORM compiles QuerySet lookups into SQL fragments carrying %s placeholders via django/db/models/lookups.py. Two related defects are addressed by the fix: Range.as_sql() formatted its BETWEEN %s AND %s template from the right-hand-side sequence without enforcing an exact arity, and FieldGetDbPrepValueIterableMixin.batch_process_rhs() zipped pre-processed SQL and parameter lists without a length check (the patch adds strict=True and unpacks start, end = rhs). The advisory and the accompanying regression tests describe the root cause as an unbalanced-placeholder condition: a bilateral transform (a Transform subclass with bilateral = True, e.g. a bilateral Lower) can compile None to a parameter-less IS NULL fragment, so the number of placeholders no longer matches the number of parameters after compilation, and % characters in column aliases or JSON key transforms (tests use data__x%sy) interact with Django's percent-based placeholder formatting. Django's advisory states the __range flaw 'required incorrectly using more than two right-hand side values' and the __in flaw 'required a bilateral transform', so neither is triggered by ordinary, correctly-formed lookups. This is CWE-89 (SQL injection), but the injection point is application-constructed query metadata rather than directly attacker-supplied input, which is why the vendor rates it 'high' under its own policy rather than critical despite the 9.3 CVSS 4.0 base. The advisory notes that percent signs in column aliases and key transforms were deprecated in Django 6.0 and are scheduled for removal in Django 2028.

Know when Django gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (DSF) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.8 CRITICAL

SQL injection reachable over the network without privileges or interaction once a vulnerable query exists; full read/write database impact gives C:H/I:H/A:H, consistent with the vendor 4.0 vector.

3.1 AV:N/AC:L/PR:N/UI:N/S:N/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (DSF).

CVSS VectorVendor: DSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Dec 02, 2026 - 14:28 vuln.today
v2 - CVSS changed
CVSS changed
Dec 02, 2026 - 14:22 NVD
9.8 (CRITICAL) 9.3 (CRITICAL)
CVE Published
Dec 02, 2026 - 13:21 cve.org
CRITICAL 9.8

DescriptionCVE.org

An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. The range and in lookups are subject to SQL injection in a query involving aliases or key transforms containing percent signs. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank Cristian Panaro for reporting this issue.

Executive ViewAI

Why It Matters

A critical SQL injection vulnerability in Django versions 5.2 before 5.2.20, 6.0 before 6.0.11, and 6.1 before 6.1.4 could allow attackers to compromise data confidentiality, integrity, and availability. Although exploitation requires non-default configurations, the potential business impact is severe, affecting any organization using affected Django versions in production.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 44% exploitable
Prevalence
High
Django is a very widely deployed Python web framework across enterprises
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

More in Django

View all
CVE-2021-23336 MEDIUM POC
5.9 Feb 15

The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9

CVE-2017-12794 MEDIUM POC
6.1 Sep 07

In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for

CVE-2022-34265 CRITICAL POC
9.8 Jul 04

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne

CVE-2021-35042 CRITICAL POC
9.8 Jul 02

Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input

CVE-2019-19844 CRITICAL POC
9.8 Dec 18

Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8

CVE-2026-61594 CRITICAL POC
9.1 Sep 16

An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti

CVE-2026-61599 HIGH POC
8.8 Sep 16

Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE

CVE-2020-9402 HIGH POC
8.8 Mar 05

Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a

CVE-2016-6186 MEDIUM POC
6.1 Aug 05

Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j

CVE-2026-93456 HIGH POC
8.4 Sep 18

Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex

CVE-2026-61593 HIGH POC
8.1 Sep 16

Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros

CVE-2026-61590 HIGH POC
7.4 Sep 16

Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy