We are developing a web application where users can register using their e-mail address. During the login process, we used to have an error message "email is not registered". Since we need to maintain the privacy of our users, we changed this message to "invalid user name or password".

Are there any other ways that an attacker can identify whether an email is registered with our site or not ?

  • You should maybe do the same with your password recovery form if you haven't already.
    – Steve
    Commented Jan 18, 2017 at 1:29
  • What about during registration - obviously they couldn't get any confirmation emails, or override the current account (at least, I hope not), but usually nothing stops people from putting a different email into the account registration page. Barring a captcha or similar, of course. This somewhat has an existing answer, but it may be impossible to enumerate all possible exploits for your app... Commented Jan 18, 2017 at 1:59
  • 1
    Yes we did the same update to the forgot password and registration processes. Commented Jan 18, 2017 at 2:11

1 Answer 1


This is a good change that you did to hardening privacy leakage in your app. From a point of an attacker, there is one other way to identify the email is registered in your site or not. But this is depending on how you have implemented your authentication process, performance of your web servers etc..

Normally we store the user password as a hash in the DB along with the salt value(Hope you did the same?). So, if the login process identifies an email is existing in your DB, then it is calculates the hash of given password and try to compare hashes. Calculating the hash of given password takes bit of time. So what attacker can do is, compare the response times from your login page and identify emails which takes longer time to respond.

As a remedy to this kind of an attack. You have to manually control your response time in your login page to a constant.

  • Will the time difference be really that high?
    – Limit
    Commented Jan 18, 2017 at 3:30
  • 2
    Yes it is. But cant measure this using naked eye. You need to use a tool to measure response time. You can easily measure those extra milliseconds. If the app is using simple hash like MD5 the difference is less. But I do not think any person who is aware of security using MD5 anymore. Commented Jan 18, 2017 at 3:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .