Account Enumeration

Easy

Checks whether the login and password reset forms reveal which email addresses have accounts.

Estimated fix time: 20 minutes

What this check looks for

StackShield submits your login form and your password reset form once each, using a random address at example.com, a domain reserved for documentation that has no mailboxes. It then reads how the form answers. The check looks at the standard Laravel paths: /login, /forgot-password and the older /password/email.

No real account is involved, no email is sent, and a single attempt per form stays far below any lockout threshold. Registration forms are not probed, because they can only be judged with an address that is known to exist.

Why it matters

A form that says "we can't find a user with that email address" answers a question nobody should be able to ask: is this person a customer? An attacker can run a list of addresses through the form and keep the ones that exist. Those addresses become the target list for credential stuffing and for phishing that names your product, and for some applications membership is sensitive in itself.

Laravel's default password reset response is one of these. A stock Breeze, Jetstream or Fortify application tells the visitor when an address is unknown, so most applications fail this check until the response is changed.

What the findings mean

A medium finding means the form told us the address has no account, and quotes the message it used. A low finding means the reset form rejected the unknown address with a message we could not classify, which is worth comparing by hand against the answer for a real account.

The fix is to give one answer in both cases, such as "if that address has an account, we have emailed a reset link". With Fortify, bind your own FailedPasswordResetLinkRequestResponse that returns the same response as the successful one. With Breeze, change PasswordResetLinkController to return the passwords.sent status whatever the broker reports. Keep both forms rate limited so slower signals, such as response time, cannot be measured at scale.

Automatically detect this issue

StackShield can automatically scan your Laravel application for this security issue and alert you when it's detected.

Start Free Trial
Was this guide helpful?