An attacker can enumerate users through the response time 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 within a certain period of time. Letβs suppose this is 5 seconds.
Now, when you enter the second email address and submit the form, you will get a HTTP response within a certain period of time, which is always less than the time taken by the first email address. Letβs suppose this is 2 seconds.
This behavior is shown, because the backend server possibly performs the following actions:
Actually, this is the behavior of the majority of the applications, however in case of this application, the response time varies every time, i.e. the process is happening one after the other instead of doing the email sending part in the background.
By analyzing this behavior, an attacker can easily determine which email addresses exist in the database, and which donβ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.