Facebook says it recently discovered a security breach affecting nearly 50 million user accounts, news agency AP reported.
According to the company, the hackers exploited the "View As" feature on the service.
Facebook, however, said it has taken steps to fix the security problem and alerted law enforcement.
"Our investigation is still in its early stages. But it’s clear that attackers exploited a vulnerability in Facebook’s code that impacted “View As”, a feature that lets people see what their own profile looks like to someone else. This allowed them to steal Facebook access tokens which they could then use to take over people’s accounts. Access tokens are the equivalent of digital keys that keep people logged in to Facebook so they don’t need to re-enter their password every time they use the app," Facebook said in a blog post.
Facebook shares fell 3 percent to $163.78 in trading on Friday afternoon.
If you've been logged out of your account and asked to sign back in, it’s because we've discovered a security issue and are taking immediate action to protect people on Facebook. Learn more https://t.co/XLcHGYFBu2— Facebook (@facebook) September 28, 2018
Access tokens are the equivalent of digital keys that keep people logged in to Facebook so they do not need to re-enter their password every time they use the app.
"Our investigation is still in its early stages. But it's clear that attackers exploited a vulnerability in Facebook's code that impacted 'View As', a feature that lets people see what their own profile looks like to someone else," said Guy Rosen, VP of Product Management.
Facebook security team discovered the security issue on September 25, and it has now fixed the vulnerability and informed the law enforcement.
"We have reset the access tokens of the almost 50 million accounts we know were affected to protect their security.
"We're also taking the precautionary step of resetting access tokens for another 40 million accounts that have been subject to a 'View As' look-up in the last year," Facebook said.
As a result, around 90 million people will now have to log back into Facebook, or any of their apps that use Facebook login.
After they have logged back in, people will get a notification at the top of their News Feed explaining what happened.
"We're temporarily turning off the 'View As' feature while we conduct a thorough security review," Facebook said.
This attack exploited the complex interaction of multiple issues in Facebook code.
"The attackers not only needed to find this vulnerability and use it to get an access token, they then had to pivot from that account to others to steal more tokens," it said.
Facebook said it does not know who is behind this massive security attack.
"We're working hard to better understand these details and "we will update this post when we have more information, or if the facts change," said the company.
In the Cambridge Analytica scandal, data of nearly 87 million people was breached upon.