1 Enumeration via Login and Reset Responses
Account enumeration occurs when an application reveals whether a username or email is registered through different responses to valid vs invalid accounts.
Login enumeration:
# Vulnerable: different messages for valid vs invalid username
def login(username, password):
user = db.find_user(username)
if not user:
return "Username not found" # Reveals: username does NOT exist
if not verify_password(password, user.password_hash):
return "Incorrect password" # Reveals: username DOES exist
return "Login successful"Password reset enumeration:
POST /reset-password
Email: [email protected] → Response: "Email address not found"
Email: [email protected] → Response: "Reset link sent to your email"
An attacker can build a list of valid emails/usernames by automating these requests and observing the response differences. This enables targeted phishing and credential stuffing.