User Enumeration Vulnerability in Python Django - CVE-2024-39329
Summary
DEBIAN-CVE-2024-39329: An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14. Affects python-django versions < 3:4.2.14-1. Fixed in 3:4.2.14-1. 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 web framework that encourages rapid development and clean, pragmatic design. It is widely used for building web applications and provides a robust set of features including an authentication system, ORM, and an admin interface. However, certain versions of Django have a vulnerability that allows attackers to exploit the authentication mechanism, specifically targeting the ModelBackend.authenticate() method.
Vulnerability Detail
An issue was discovered in Django versions 5.0 before 5.0.7 and 4.2 before 4.2.14. The vulnerability allows remote attackers to enumerate users through a timing attack by sending login requests for users with unusable passwords. This can lead to unauthorized access or account enumeration, where attackers can determine valid usernames based on the response time of the login attempts.
How To Fix
Minimum fixed version
3:4.2.14-1
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, consider implementing rate limiting on login attempts to mitigate the risk of timing attacks. This can be done by adding a delay between failed login attempts or limiting the number of attempts from a single IP address.
Conclusion
The vulnerability CVE-2024-39329 poses a significant risk to applications using affected versions of Django. It is crucial to update to the patched version to protect against potential user enumeration attacks. Implementing workarounds such as rate limiting can provide temporary relief until the update is applied.
See every vulnerability recorded for python-django →
FAQ
CVE-2024-39329 is a vulnerability in Django that allows attackers to enumerate users through timing attacks on the authentication process.
Django versions 5.0 before 5.0.7 and 4.2 before 4.2.14 are affected by this vulnerability.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.
If immediate updates are not possible, implement rate limiting on login attempts to reduce the risk of exploitation.
More information can be found in the official Debian CVE database at https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2024-39329.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for python-django.