Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always understood that servers don't actually store user passwords. Instead, they store hashes of passwords and then they validate the user input by applying the hash function, then compare the hashed result to the hash value stored locally at the server. Without receiving a password and then applying this hash-and-compare operation, a user doesn't get access.

If this is the case, how can thousands of Yahoo account passwords be stolen, as reported recently?

If this is not the case (as to how Yahoo password authentication is done), then how is it done? Do they really keep the actual passwords on hand? Is this common practice?

share|improve this question
Sadly, keeping cleartext (or encrypted, instead of hashed) passwords is more common practice than most of us would like. Check out – Iszi Aug 1 '12 at 23:41
up vote 2 down vote accepted

The attackers exploited a database weakness which caused the database to accidentally dump a large batch of username*||hash (and possibly salt) records.

The hashes were then brute-forced offline, revealing all the weaker passwords like "toto24" and "123456" or "mypassword", but not the strong ones. This compromised a really large fraction of the accounts, since most people have crap passwords. And often, even just knowing the username is enough, as the person might have signed up with the same username at a website with even weaker security - but here's the interesting part: he also signed up with the same password. Game over!

Yahoo never had the plaintext passwords at hand, although they could have cracked the weak accounts as well if they really wanted to, but they just have no incentive to do that.

*In the case of Yahoo, username = email.

share|improve this answer
That makes sense. The news reports sounded as if Yahoo had acted irresponsibly. Apparently, news reporting can be inaccurate at times. (Who would have guessed?!) – Jim Aug 1 '12 at 23:33
@Jim Well looking over the dump again, many cracked passwords are not what I would call weak, so I could be wrong and Yahoo did keep information about the passwords. But that would be such a gaping security failure I doubt even Yahoo is capable of it. – Thomas Aug 1 '12 at 23:35
Even with hashed passwords, the company still could have acted irresponsibly. I've forgotten the specifics to be able to comment accurately on Yahoo's case, but examples of irresponsible hashing would include: using a weak hashing mechanism (i.e.: MD5), and/or hashing without salt. – Iszi Aug 1 '12 at 23:35
The hashes were weak. Even if you use salted MD5 / SHA1, GPUs are incredibly efficient at cracking them - you can build cracking rigs with consumer hardware that can compute >45 billion MD5 hashes per second. Even the strong passwords will fall after a while. Solution: use bcrypt. – Polynomial Aug 2 '12 at 5:51
The problem with the recent Yahoo leak was it was caused by an actual security problem within the Yahoo Email service itself, which is worst then say, a server that was simply vulerable to attack. – Ramhound Aug 2 '12 at 13:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.