User Enumeration Vulnerability in Django: CVE-2016-2513

python-django Updated 02 Oct 2025

Summary

08/04/2016
N/A
Yes i
Low
3.1

CVE-2016-2513: The password hasher in contrib/auth/hashers.py in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to enumerate users via a timing attack involving login requests. Affects python-django across 2 version ranges.

< 1.9.4-1 < 67b46ba7016da2d259c1ecc7d666d11f5e1cfaab

Fixed in 1.9.4-1. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

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 a robust set of features, including an authentication system. However, prior to versions 1.8.10 and 1.9.3, Django's password hasher was susceptible to a timing attack, allowing attackers to enumerate valid usernames through crafted login requests.

Vulnerability Detail

The vulnerability, identified as CVE-2016-2513, arises from the password hasher in Django's contrib/auth/hashers.py. It allows remote attackers to exploit timing discrepancies in login responses to determine valid usernames. This can lead to unauthorized access attempts and potential account compromise, as attackers can systematically verify user existence without needing to guess passwords.

How To Fix

Minimum fixed version

1.9.4-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

If upgrading is not immediately possible, consider implementing rate limiting on login attempts to reduce the effectiveness of timing attacks. Additionally, you can obfuscate error messages to prevent attackers from gaining insights into valid usernames.

Conclusion

CVE-2016-2513 is a significant vulnerability in Django that can lead to user enumeration through timing attacks. It is crucial for developers using affected versions to upgrade to at least version 1.9.4 to protect their applications. Implementing additional security measures, such as rate limiting and error message obfuscation, can further enhance security.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

CVE-2016-2513 is a vulnerability in Django that allows attackers to enumerate valid usernames through timing attacks on the login process.

Django versions before 1.8.10 and 1.9.x before 1.9.3 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability can lead to user enumeration, allowing attackers to identify valid usernames and potentially launch further attacks.

The CVSS score for CVE-2016-2513 is 3.1, indicating a low to moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

1.9.4-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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback