Skip to main content

Django CVE-2026-5766

| EUVDEUVD-2026-27381 MEDIUM
Improper Handling of Length Parameter Inconsistency (CWE-130)
2026-05-05 DSF GHSA-w26r-rmm8-9c29
6.3
CVSS 4.0 · Vendor: DSF
View

Attack ChainAIDerived

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

  1. Access
    Craft ASGI POST request
  2. Delivery
    Omit or understate Content-Length header
  3. Exploit
    Stream large multipart file body
  4. Execution
    Bypass FILE_UPLOAD_MAX_MEMORY_SIZE check
  5. Persist
    Exhaust server memory
  6. Impact
    Trigger service degradation

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Length parameter validation
Exploitation Conditions

Exploitation requires: (1) a Django application using ASGI mode (not WSGI), (2) a publicly accessible or network-accessible file upload endpoint, (3) no Content-Length validation enforced by an upstream reverse proxy or web server, and (4) FILE_UPLOAD_MAX_MEMORY_SIZE configured in Django (the default is 2.5 MB). The vulnerability does NOT require authentication (PR:N) or user interaction (UI:N). It is limited to ASGI deployments; WSGI-based Django applications are unaffected because WSGI servers typically enforce upload limits before reaching the Django application layer. The attack is further constrained by available server memory and network bandwidth, so instances with small RAM pools may hit system limits before Django's internal checks.

Impact

CVSS 6.3 with AV:N/AC:L indicates network-accessible exploitation with low complexity. However, the CVSS vector includes AT:P (attack time, possibly in attack tool required) and targets availability only (VA:L, scope=N), indicating medium rather than critical severity. The vulnerability is not confirmed actively exploited (no KEV listing in provided data), but the low attack complexity and lack of authentication requirements (PR:N, UI:N) mean any remote actor can probe and exploit affected instances. The real-world risk depends heavily on deployment: Django instances behind load balancers or proxies that enforce Content-Length validation are protected; instances directly exposed to untrusted networks without such protections face denial-of-service risk. The vulnerability is not a code execution or data breach vector but a resource exhaustion attack surface. Given that Django's own documentation recommends web-server-level upload limits, many deployments may already have mitigations in place, reducing practical impact.

Exploit ScenarioDerived

An attacker sends an ASGI POST request to a Django file upload endpoint (e.g., a form submission handler) with a Content-Length header set to 100 bytes but a multipart form body containing 100 MB of data. Django's upload handler reads the body into memory without validating that it exceeds FILE_UPLOAD_MAX_MEMORY_SIZE, consuming gigabytes of RAM. If the attacker repeats this across multiple concurrent connections, the application server exhausts available memory and becomes unresponsive, achieving denial of service.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – May 05, 2026

Django 6.0 before 6.0.5 and 5.2 before 5.2.14 allow remote attackers to bypass the FILE_UPLOAD_MAX_MEMORY_SIZE limit by submitting ASGI requests with missing or understated Content-Length headers, potentially loading large files into memory and causing denial of service through resource exhaustion. No active exploitation confirmed, but the vulnerability requires only network access and no authentication, making it trivially exploitable once the bypass is understood.

RemediationAI

Upgrade Django to version 6.0.5 or later for Django 6.0 users, or 5.2.14 or later for Django 5.2 users. Apply the security releases from the Django project's May 2026 security release announcement. As a compensating control, configure file upload limits at the web server layer (nginx, Apache, or equivalent), independent of Django's FILE_UPLOAD_MAX_MEMORY_SIZE setting-this is Django's recommended practice and will prevent exploitation even on unpatched or unsupported versions. Additionally, deploy a reverse proxy or load balancer that validates and enforces Content-Length constraints before requests reach the Django application, ensuring malformed or missing headers trigger rejection rather than processing. Monitor application memory usage and implement per-request memory quotas to detect and halt anomalously large uploads in real time.

Affected VersionsENISA

Django 6.0 <6.0.5
Django 5.2 <5.2.14

Affected Packages

pypi django fix: 5.2.14, 6.0.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

Django's file upload handling in ASGI mode relies on the Content-Length header to enforce the FILE_UPLOAD_MAX_MEMORY_SIZE setting, which limits in-memory file storage to prevent memory exhaustion attacks. CWE-130 (Improper Handling of Length Parameters) identifies the root cause: the framework fails to validate or enforce upload size limits when the Content-Length header is absent, malformed, or intentionally understated by a client. This affects ASGI deployments specifically, as the ASGI specification requires servers to parse headers from incoming requests. When Content-Length is missing or incorrect, Django does not fall back to an alternative size-checking mechanism, allowing attackers to stream arbitrarily large payloads into memory buffers without triggering the intended protective limit.

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 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Red Hat 5.3 MEDIUM

Primary rating from Vendor (DSF).

CVSS VectorVendor: DSF

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

Lifecycle Timeline

1
CVSS changed
May 05, 2026 - 16:22 NVD
5.3 (MEDIUM) 6.3 (MEDIUM)

DescriptionCVE.org

An issue was discovered in 6.0 before 6.0.5 and 5.2 before 5.2.14. ASGI requests with a missing or understated Content-Length header can bypass the FILE_UPLOAD_MAX_MEMORY_SIZE limit, potentially loading large files into memory and causing service degradation.

As a reminder, Django expects a limit to be configured at the web server level rather than solely relying on FILE_UPLOAD_MAX_MEMORY_SIZE. 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 Kyle Agronick for reporting this issue.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 12 pypi packages depend on django (12 direct, 0 indirect)

Ecosystem-wide dependent count for version 5.2.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

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

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP6 Fixed

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