Junglewise Threat Intelligence

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

Technologies: Django Software Foundation Django, Django (PyPI). Vendors: Django Software Foundation, PyPI.

Executive brief

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.

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

Timeline

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

References

Related threats