CVE-2018-16984: Django - Unprivileged Users Can Read Password Hashes
Summary
CVE-2018-16984: Django allows unprivileged users to read the password hashes of arbitrary accounts. Affects django versions >= 2.1, < 2.1.2. Fixed in 2.1.2. 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
Django is a popular Python web framework that provides a set of tools and libraries for building web applications. It offers features such as URL routing, template engine, database abstraction, and user authentication. Django is widely used in the development of secure and scalable web applications.
Vulnerability Detail
An issue was discovered in Django 2.1 before 2.1.2, where unprivileged users can read the password hashes of arbitrary accounts. The vulnerability arises from a bypass in the read-only password widget used by the Django Admin to display an obfuscated password hash. If a user has only the 'view' permission, the widget fails to obfuscate the password hash, resulting in the display of the entire hash. This poses a risk for sites with legacy user accounts that use insecure hashes, as it exposes the password hashes to unauthorized users.
How To Fix
Latest published version: 6.1.2 as of 22 Oct 2026
pip install --upgrade "django==6.1.2"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.1.2
This is the first release that contains the fix.
pip install --upgrade "django==2.1.2"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading Django is not immediately feasible, a temporary workaround is to restrict access to the Django Admin interface for unprivileged users. By limiting access to only authorized administrators, the risk of unauthorized users viewing the password hashes can be mitigated.
Conclusion
The vulnerability in Django allows unprivileged users to read the password hashes of arbitrary accounts, potentially compromising the security of user accounts. It is recommended to upgrade Django to version 2.1.2 or later to fix this vulnerability. If immediate upgrade is not possible, restricting access to the Django Admin interface for unprivileged users can serve as a temporary workaround. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for django →
FAQ
The vulnerability allows unprivileged users to view the password hashes of arbitrary accounts, potentially compromising the security of user accounts and exposing them to brute-force attacks or password cracking techniques.
The vulnerability affects Django versions 2.1 and earlier. Specifically, versions before 2.1.2 are vulnerable.
At the time of this advisory, there are no known public exploits specifically targeting this vulnerability. However, it is important to promptly apply the recommended fix to mitigate the risk.
No, this vulnerability requires an authenticated user with the 'view' permission to exploit it. It cannot be exploited remotely without valid credentials.
There is no evidence of active attacks exploiting this vulnerability at the time of this advisory. However, it is crucial to address the vulnerability promptly to prevent any potential exploitation.
Related vulnerabilities
Recent vulnerabilities recorded for django.