Yahoo YHOO

The company said it believes a "state-sponsored actor" was behind the data breach, meaning an individual acting on behalf of a government. The breach is said to have occurred in late 2014.

"The account information may have included names, email addresses, telephone numbers, dates of birth, hashed passwords (the vast majority with bcrypt) and, in some cases, encrypted or unencrypted security questions and answers," Yahoo said in a statement.

Yahoo urges users to change their password and security questions and to review their accounts for suspicious activity.

The silver lining for users -- if there is one -- is that sensitive financial data like bank account numbers and credit card data are not believed to be included in the stolen information, according to Yahoo.

Related: What to do if your Yahoo account was hacked

Yahoo is working with law enforcement to learn more about the breach.

"The FBI is aware of the intrusion and investigating the matter," an FBI spokesperson said. "We take these types of breaches very seriously and will determine how this occurred and who is responsible. We will continue to work with the private sector and share information so they can safeguard their systems against the actions of persistent cyber criminals."

A large-scale data breach was first rumored in August when a hacker who goes by the name of "Peace" claimed to be selling data from 200 million Yahoo users online. The same hacker has previously claimed to sell stolen accounts from LinkedIn (LNKD) and MySpace.

Yahoo originally said it was "aware of a claim" and was investigating the situation. Nearly two months later, it turns out the situation is even worse.

"This is massive," said cybersecurity expert Per Thorsheim on the scale of the hack. "It will cause ripples online for years to come."

U.S. Sen. Richard Blumenthal called for tougher legislation to "make sure companies are properly and promptly notifying consumers when their data has been compromised."

"If Yahoo knew about the hack as early as August, and failed to coordinate with law enforcement, taking this long to confirm the breach is a blatant betrayal of their users' trust," he said in a statement.

Related: Why Marissa Mayer couldn't save Yahoo

Re/code first reported Yahoo would confirm the data breach.

The data breach comes at a sensitive time for Yahoo.

Verizon (VZ) agreed to buy Yahoo's core properties for $4.83 billion in late July, just days before the hack was first reported. The deal is expected to close in the first quarter of 2017.

Verizon says it only learned of the breach this week.

"Within the last two days, we were notified of Yahoo's security incident," a spokesperson for Verizon said in a statement provided to CNNMoney.

We understand Yahoo is conducting an active investigation of this matter, but we otherwise have limited information and understanding of the impact."

The mega-breach could create a headache for both companies, including damaging press, scrutiny from regulators and a user exodus, just as they're working to close the deal and figure out the future of Yahoo.

Blumenthal said law enforcement and regulators "should investigate whether Yahoo may have concealed its knowledge of this breach in order to artificially bolster its valuation in its pending acquisition by Verizon."

-- Sara Ashley O'Brien contributed to this report.