CVE-2026-108147: Potential memory exhaustion in MultiPartParser via base64-encoded file upload
An issue was discovered in Django 6.1 before 6.1.3, 6.0.4 before 6.0.10, and 5.2.13 before 5.2.19. django.http.multipartparser.MultiPartParser is subject to excessive memory consumption when processing multipart file uploads with base64 Content-Transfer-Encoding, which could be buffered entirely in memory before being passed to upload handlers. 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 Ignacy Kujawa for reporting this issue.
Other sources
Potential memory exhaustion in MultiPartParser via base64-encoded file upload
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/py3-djangoto a version that resolves this vulnerability.Fixed in 5.2.19-r0 - Upgrade
Upgrade
azurelinux/python-django5to a version that resolves this vulnerability.Fixed in 0:5.2.19-1.azl4 - Upgrade
Upgrade
debian/python-djangoto a version that resolves this vulnerability.Fixed in 3:3.2.25-0+deb12u7 - Upgrade
Upgrade
debian/python-djangoto a version that resolves this vulnerability.Fixed in 3:4.2.30-0+deb13u1 - Upgrade
Upgrade
debian/python-djangoto a version that resolves this vulnerability.Fixed in 3:5.2.19-1 - Upgrade
Upgrade
debian/python-djangoto a version that resolves this vulnerability.Fixed in 3:3.2.25-0+deb12u7Fixed in 3:4.2.30-0+deb13u1Fixed in 3:5.2.19-1
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using Django 6.1 before 6.1.3, Django 6.0.4 before 6.0.10, or Django 5.2.13 before 5.2.19 are affected. Unsupported series including 5.1.x, 5.0.x, and 4.2.x were not evaluated and may also be affected.
What does an attacker need to do to trigger the memory exhaustion?
An attacker needs network access to submit a multipart file upload using base64 Content-Transfer-Encoding. No privileges or user interaction are required according to the supplied vector.
What is the practical impact?
The multipart parser may buffer the base64-encoded upload entirely in memory before it reaches upload handlers. This can cause excessive memory consumption and reduced availability.
What versions address the issue?
Upgrade to Django 6.1.3 or later, 6.0.10 or later within the 6.0 series, or 5.2.19 or later within the 5.2 series. The provided data does not identify a mitigation for systems that cannot be upgraded.