All vulnerabilities
CRITICALOpSeccurated

OPSEC-YAHOO-2013

Web · Email · Yahoo

Summary

Yahoo suffered the largest data breach ever recorded: an August 2013 intrusion that, after later revisions, was found to have exposed all three billion of its user accounts, plus a separate state-sponsored 2014 breach of about 500 million accounts. Stolen data included names, emails, phone numbers, dates of birth, security questions and answers, and, in the larger 2013 breach, passwords hashed with the weak, fast MD5 algorithm, which made them practical to crack. In the 2014 breach the attackers also stole Yahoo's account-management tooling and forged authentication cookies to log into accounts with no password at all. Yahoo knew of the breaches but did not disclose them until 2016, during Verizon's acquisition, which cut the purchase price by $350 million and earned the first-ever SEC fine for failing to disclose a breach. It is the lesson in strong password hashing, session-cookie integrity, MFA, and timely, honest disclosure.

How it happened

There were at least two distinct breaches, and Yahoo got both halves wrong.

The 2013 breach is the record-setter. Attackers made off with Yahoo's entire user database, which after a 2017 revision was confirmed to cover all three billion accounts that existed at the time. The passwords were "protected" with MD5, a hashing algorithm so fast and outdated that cracking large batches of it is routine; many were effectively recoverable. Worse, the security questions and answers, the things people reuse to recover other accounts, were stored partly in the clear.

The 2014 breach, attributed to Russian state actors, was smaller (about 500 million accounts) but technically nastier. The attackers stole the proprietary code and secret keys behind Yahoo's account-management system, then used them to forge authentication cookies. A forged cookie let them open a targeted account directly, with no password and no login prompt; while the stolen database covered all 500 million accounts, prosecutors say the cookie-forging was actually used to break into about 6,500 specifically targeted accounts, journalists, government officials, and company staff. (The 2014 passwords were mostly protected with the stronger bcrypt, unlike the 2013 MD5 set.) US prosecutors later indicted two officers of Russia's FSB and two criminal hackers for it.

The damage

Three billion accounts is, to date, the largest breach in history, and the stolen data, names, phone numbers, birth dates, security answers, and crackable password hashes, is exactly the raw material that fuels years of downstream attacks. Those billions of recovered passwords feed credential-stuffing campaigns against every other site, because so many people reuse them. The handling made it worse: Yahoo had known about the breaches well before it told anyone, disclosing only in 2016 as Verizon was buying the company. Verizon knocked $350 million off the price. The US Securities and Exchange Commission later fined the successor company $35 million, its first enforcement action for failing to disclose a breach to investors, on top of a roughly $117.5 million class-action settlement. Of the four men indicted, only the Canadian hacker Karim Baratov was ever prosecuted, sentenced to five years in a US prison; the two FSB officers remain in Russia, beyond reach.

Why Yahoo still matters

Yahoo is the standing argument for four basics. First, store passwords properly: never MD5 or any fast, unsalted hash, but a slow, salted, memory-hard one like Argon2, bcrypt, or scrypt, so a stolen database is not an open one. Second, protect the integrity of session tokens: if attackers can steal the keys that mint your authentication cookies, they walk in without ever needing a password, so those keys are crown jewels. Third, offer and push MFA, so a cracked or stuffed password is not enough on its own. And fourth, disclose breaches promptly and honestly: Yahoo's concealment compounded the damage, cratered its sale price, and set the legal precedent that hiding a breach is itself a punishable failure.

How to fix it

  • Invalidate all sessions and forged cookies, and rotate the signing secrets used to mint authentication tokens.
  • Force password resets and migrate every stored password to a slow, salted hash (bcrypt, scrypt, or Argon2).
  • Reset security questions and push users onto MFA.
  • Disclose promptly and accurately to users and regulators; concealment compounds the damage.

How to avoid it

  • Hash passwords with a slow, salted, memory-hard algorithm (Argon2, bcrypt, or scrypt), never MD5 or unsalted hashes.
  • Sign and validate session cookies and tokens with protected secrets so they cannot be forged, and bind them to context.
  • Offer and encourage MFA so a stolen or cracked password is not enough on its own.
  • Protect account-management and admin tooling as crown jewels; its theft is what enabled the cookie forgery.
  • Detect and disclose breaches quickly; have an incident-response and notification plan ready before you need it.

References

Related vulnerabilities

All OpSec →