CVE-2026-5766

Description

A flaw was found in Django. This vulnerability allows a remote attacker to bypass the FILE_UPLOAD_MAX_MEMORY_SIZE limit by sending specially crafted ASGI (Asynchronous Server Gateway Interface) requests with a missing or understated Content-Length header. This can lead to large files being loaded into memory, potentially causing service degradation or a Denial of Service (DoS) condition.

Statement

This Moderate flaw in Django can lead to service degradation or a denial of service. A remote attacker can exploit this by sending ASGI requests with a manipulated Content-Length header, bypassing the FILE_UPLOAD_MAX_MEMORY_SIZE and causing large files to be loaded into memory. Red Hat advises implementing content length restrictions at the web server layer, as Django's internal limits are not solely relied upon for protection.

Mitigation

To mitigate this issue, configure the web server (e.g., Nginx, Apache) hosting the Django application to enforce strict Content-Length limits for incoming ASGI requests. This ensures that large files cannot be loaded into memory by bypassing Django's internal FILE_UPLOAD_MAX_MEMORY_SIZE setting. Consult your web server's documentation for specific configuration instructions on limiting request body size. A service reload or restart may be required for the changes to take effect, which could temporarily impact service availability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.3N/A5.3
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityNoneN/ANone
Integrity ImpactNoneN/ANone
Availability ImpactLowN/ALow

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.

Frequently Asked Questions

Want to get errata notifications? Sign up here.