An attacker can enumerate users through the response message in the password reset page. When you visit the password reset page, you will be provided with the option to enter your email address. Letβs use two different emails, one will be a valid address, and another will be an invalid one.
When you enter the first email address and submit the form, you will get a HTTP response, where it says: βSuccess: Your password link has been sent!β.
Now, when you enter the second email address and submit the form, the HTTP response will contain: βSuccess: If that email address exists in our system, a password recovery email has been sent.β
Here, you can clearly see that there are two different response messages. By analyzing these responses, it is clear that an attacker can determine which email addresses are registered in this portal, and which arenβt.
An attacker would be able to increase the probability of success of password brute-forcing attacks against the system, because he/she would be able to figure out which email addresses they need to try their brute-forcing attacks on.
This vulnerability can be fixed by providing a response like βSuccess: If that email address exists in our system, a password recovery email has been sent.β for valid email addressess as well.