Yahoo has discovered a three-year old security breach that enabled a hacker to compromise more than one billion user accounts, breaking the company’s own humiliating record for the biggest security breach in history.

The digital heist disclosed on Wednesday occurred in August 2013, more than a year before a separate hack that Yahoo announced nearly three months ago. That breach affected at least 500 million users, which had been the most far-reaching hack until the latest revelation.

“Simply everyone that has a Yahoo account should be concerned,” Robert Siciliano, a US-based security analyst, told Al Jazeera. “Once a criminal hacker has access to your email, that is a portal to reset the passwords for all of your critical accounts, which that Yahoo account is associated with.”

Both lapses occurred during the reign of Yahoo chief executive Marissa Mayer, a once-lauded leader who found herself unable to turn around the company in the four years since her arrival. Earlier this year, Yahoo agreed to sell its digital operations to Verizon Communications for $4.8bn – a deal that may now be imperiled by the hacking revelations.

Yahoo didn’t say if it believes the same hacker might have pulled off two separate attacks. The Sunnyvale, California, company blamed the late 2014 attack on a hacker affiliated with an unidentified foreign government, but said it hasn’t been able to identify the source behind the 2013 intrusion.

Yahoo: Users need not worry

Yahoo has more than a billion monthly active users, although some have multiple accounts and others have none at all. An unknown number of accounts were affected by both hacks.

In both attacks, the stolen information included names, email addresses, phone numbers, birthdates and security questions and answers.

The company says it believes bank-account information and payment-card data were not affected. But hackers also apparently stole passwords in both attacks. Technically, those passwords should be secure; Yahoo said they were scrambled twice – once by encryption and once by another technique called hashing.

READ MORE: Hackers cripple US internet in wide-scale cyber attack

But hackers have become adept at cracking secured passwords by assembling huge dictionaries of similarly scrambled phrases and matching them against stolen password databases.

That could mean trouble for any users who reused their Yahoo password for other online accounts. Yahoo is requiring users to change their passwords and invalidating security questions so they can’t be used to hack into accounts. (You may get a reprieve if you’ve changed your password and questions since September.)

Security experts said the 2013 attack was probably the work of a foreign government fishing for information about specific people. One big tell: It doesn’t appear that much personal data from Yahoo accounts has been posted for sale online, meaning the hack probably wasn’t the work of ordinary criminals.

That means most Yahoo users probably don’t have anything to worry about, said Jonathan Thompson, chief executive of Rook Security.