CVE-2026-5766: Django Improper Handling of Length Parameter Inconsistency in ASGI requests

CVE-2026-5766 · Severity: medium · CVSS 5.3 · Published 2026-05-05

Django is a popular web framework used to build and power websites. A vulnerability has been identified where attackers can bypass file upload size limits by sending specially crafted requests. This could allow an attacker to exhaust a server's memory by uploading very large files, leading to website slowdowns or complete service outages.

Technologies: Djangoproject Django, Django (PyPI). Vendors: Djangoproject, PyPI.

Quick answers

Is CVE-2026-5766 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-5766 being exploited in the wild.
How severe is CVE-2026-5766?
Medium severity, with a CVSS score of 5.3, published 5 May 2026.
Which products and versions are affected?
Django (PyPI) ECOSYSTEM:introduced=5.2,fixed=5.2.14,introduced=6.0,fixed=6.0.5, ECOSYSTEM:introduced=6.0,fixed=6.0.5.
Is there a fix for CVE-2026-5766?
Yes. Django (PyPI): upgrade to 6.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-5766 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-5766?
Check whether you run Djangoproject Django or Django (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Django (PyPI): upgrade to 6.0.5 or later
    pip install "Django>=6.0.5"

Technical details

A vulnerability exists in Django's handling of ASGI requests where the 'FILE_UPLOAD_MAX_MEMORY_SIZE' setting can be bypassed. The root cause is an improper handling of length parameter inconsistency (CWE-130) when the 'Content-Length' header is either missing or understated. An unauthenticated remote attacker can exploit this by sending large file uploads that exceed configured memory limits, potentially leading to a Denial of Service (DoS) through memory exhaustion. The issue is resolved in Django versions 6.0.5 and 5.2.14. Users are also advised to configure upload limits at the web server level (e.g., Nginx or Apache) as a defense-in-depth measure.

Affected products

  • Django Software Foundation Django >= 6.0, < 6.0.5
  • Django Software Foundation Django >= 5.2, < 5.2.14

Identifiers

  • CVE-2026-5766
  • GHSA-w26r-rmm8-9c29
  • PYSEC-2026-54

Timeline

  • 2026-05-05: disclosed
  • 2026-05-05: advisory
  • 2026-05-05: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.