Critical Vulnerability in Python-Django: Infinite Loop in MultiPartParser
Summary
UBUNTU-CVE-2022-23833: An issue was discovered in MultiPartParser in Django 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2. Affects python-django versions < 1.6.11-0ubuntu1.3+esm4. Fixed in 1.6.11-0ubuntu1.3+esm4. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Python-Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It is widely used for building web applications and provides features such as an ORM, routing, and templating. However, certain versions of Django are susceptible to a vulnerability in the MultiPartParser, which can lead to an infinite loop when processing multipart form data.
Vulnerability Detail
An issue was discovered in MultiPartParser in Django versions 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2. The vulnerability arises when specific inputs are passed to multipart forms, potentially causing the application to enter an infinite loop during file parsing. This can lead to denial of service as the application becomes unresponsive, affecting user experience and system stability.
How To Fix
Minimum fixed version
1.6.11-0ubuntu1.3+esm4
This is the first release that contains the fix.
sudo apt-get install --only-upgrade python-django
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using multipart forms until the package is updated. Additionally, consider implementing input validation to mitigate the risk of triggering the infinite loop.
Conclusion
The vulnerability in Python-Django's MultiPartParser poses a significant risk to applications using affected versions. It is crucial to update to the patched versions to mitigate the risk of denial of service and ensure application stability.
See every vulnerability recorded for python-django →
FAQ
The vulnerability affects Django versions 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2.
Exploiting this vulnerability can lead to an infinite loop, causing denial of service and making the application unresponsive.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
Yes, patches are available in the form of updated versions of Django. Ensure to upgrade to the specified patched versions.
The CVSS score for this vulnerability is 7.5, indicating a high severity level.
Related vulnerabilities
Recent vulnerabilities recorded for python-django.