liveBook · Manning

Email enumeration attack

As explained in Software Security for Developers

An email enumeration attack determines whether particular email addresses correspond to registered accounts by observing application responses.

An email enumeration attack systematically tests whether email addresses or usernames belong to registered accounts by observing application responses. Different messages or behavior can reveal valid accounts for phishing, credential stuffing, brute-force logins, or password-reset attacks. section 14.1

Magic-link login

A vulnerable login page says “Email not found” for an unknown address and “Login link sent” for a registered one. A safer implementation always replies, “If an account exists, we’ve sent a login link,” without confirming account existence. section 14.1

Reduce account-discovery leakage by:

  • Returning generic responses such as “Invalid credentials” or “If an account exists, we’ve sent a login link.” section 14.1
  • Preventing enumeration across login, signup, and password-reset flows, not just magic-link requests. section 14.1
  • Combining the mitigation with short-lived, cryptographically signed tokens and request limits for magic links. section 14.4

How Software Security for Developers covers it

How deep it goes
Defines the attack, explains its consequences, and contrasts revealing responses with generic messages; it stops short of implementation code.
Examples
Contrasts account-specific login responses with a generic magic-link message that does not reveal registration status.
What it assumes
Assumes familiarity with user accounts and authentication flows while defining the attack and its risks from basic principles.
What you can do after
Apply generic responses across authentication flows to avoid confirming whether an email address belongs to an account.
How it connects
Connects email enumeration with magic links, passwordless authentication, phishing, credential stuffing, brute-force attacks, and password-reset attacks.

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.