Facebook

WikipediaVerified

Breach Date

December 4, 2019

Records Affected

267,000,000

Verified

Yes

Source

wikipedia

Summary

In December 2019, a database containing 267 million Facebook user records — including user IDs, phone numbers, and full names — was discovered exposed on an unsecured Elasticsearch server hosted in the United States. The server required no password or any form of authentication to access. Security researcher Bob Diachenko identified the exposure on December 14, 2019, but the database had already been indexed by search engine BinaryEdge on December 4 and posted on a hacker forum on December 12 — meaning the data was freely circulating before its discovery by security researchers.

The exposed server was taken offline on December 19, 2019, approximately two weeks after it was first indexed publicly. During this window, the data was accessible to anyone who found the server's IP address or the hacker forum post. The database is believed to have been compiled by scraping Facebook profiles using the platform's developer API before Facebook restricted phone number access in April 2018. The scraping likely exploited the ability to look up users by phone number — a feature that allowed automated enumeration of hundreds of millions of profiles.

This incident is distinct from the larger Facebook breach disclosed in April 2019 (540 million records from third-party app developers Cultura Colectiva and At the Pool) and from the 2021 disclosure of 533 million phone-number-linked records. While all three incidents involved Facebook user data exposed by third parties, they represent separate datasets compiled through different methods and at different times. The 267 million record exposure is particularly notable for its direct risk of enabling SMS phishing (smishing) and spam campaigns, as the combination of phone numbers with names and Facebook IDs provided everything needed for targeted social engineering attacks.

Breach Details

Breach Date
December 4, 2019
Records Affected
267,000,000
Source
Wikipedia
Verified
Verified
Industry
Social/Entertainment
Type
Poor Security

Impact Analysis

Scale of Impact

  • 267 million records exposed on an unsecured Elasticsearch server
  • Data accessible without any authentication for approximately two weeks (December 4-19, 2019)
  • Posted on a hacker forum on December 12 — two days before researcher discovery

Data Types Exposed

  • Facebook user IDs
  • Phone numbers
  • Full names

Data Not Exposed

  • Passwords or password hashes
  • Email addresses
  • Private messages
  • Photos or media
  • Friends lists
  • Financial information

Risk Assessment

RiskSeverityDescription
SMS phishing (smishing)HighPhone numbers + names enable personalized SMS phishing campaigns at massive scale
Phone spamHigh267 million phone numbers represent an enormous target list for robocalls and spam
SIM swappingMediumPhone numbers linked to identities can be used in SIM swap attacks to bypass SMS-based 2FA
Social engineeringHighName + phone number + Facebook ID enables highly convincing impersonation
Account enumerationMediumFacebook IDs allow attackers to identify active accounts for further targeting

Comparison with Other Facebook Exposures

IncidentRecordsDate ExposedData TypesCause
Facebook 540M (Cultura Colectiva)540MApril 2019IDs, names, comments, likes, reactionsThird-party S3 misconfiguration
Facebook 267M (this incident)267MDec 2019IDs, names, phone numbersScraped data on unsecured Elasticsearch
Facebook 533M (2021 disclosure)533MApril 2021IDs, names, phone numbers, emails, DOBAPI exploitation (contact importer)

Downstream Effects

  • The dataset was incorporated into SMS spam and phishing databases within days of being posted on the hacker forum
  • Phone numbers linked to names enabled targeted smishing campaigns impersonating banks, delivery services, and Facebook itself
  • The exposure contributed to growing regulatory pressure on Facebook regarding data scraping prevention

Timeline

  • Pre-April 2018: Data scraped from Facebook profiles using the platform's developer API, which allowed phone number lookups and automated profile enumeration
  • April 2018: Facebook restricts access to phone number lookup via its API following the Cambridge Analytica scandal
  • December 4, 2019: The Elasticsearch server containing 267 million records is indexed by BinaryEdge, a search engine that catalogs internet-connected devices and databases
  • December 12, 2019: The complete dataset is posted on a hacker forum, making it freely available to the cybercriminal community
  • December 14, 2019: Security researcher Bob Diachenko discovers the exposed Elasticsearch server and begins responsible disclosure
  • December 19, 2019: The Elasticsearch server is taken offline — approximately two weeks after initial public indexing
  • December 19, 2019: Diachenko and Comparitech publish research disclosing the exposure
  • 2020: The dataset continues to circulate on breach trading forums and Telegram channels
  • April 2021: A separate but related dataset of 533 million Facebook records (including phone numbers) surfaces publicly, reigniting scrutiny of Facebook's data scraping protections
  • November 2022: Irish Data Protection Commission fines Meta €265 million for the 2021 phone number scraping incident, establishing regulatory precedent for scraping-derived data exposures

Lessons Learned

1. APIs That Allow Enumeration Are Scraping Vulnerabilities

The underlying data was likely collected by abusing Facebook's phone number lookup feature — an API that allowed anyone to input a phone number and retrieve the associated profile. At scale, this enabled automated enumeration of hundreds of millions of profiles. APIs that allow lookups by unique identifiers (phone numbers, emails) must implement rate limiting, CAPTCHA challenges, and anomaly detection to prevent mass enumeration.

2. Scraped Data Has a Long Afterlife

The data was scraped before April 2018, when Facebook restricted the API. Yet it surfaced on an unsecured server in December 2019 — over 18 months later. Scraped datasets do not expire; they circulate indefinitely through the breach trading ecosystem. Restricting an API after the fact does not protect data already collected.

3. Elasticsearch Servers Require Explicit Security Configuration

Elasticsearch instances, by default in older versions, were accessible without authentication when exposed to the internet. This incident is one of hundreds involving unsecured Elasticsearch servers. Organizations deploying Elasticsearch must enforce authentication (X-Pack Security or Open Distro), restrict network access via firewalls, and never expose instances directly to the public internet.

4. Hacker Forums Move Faster Than Researchers

The data was posted on a hacker forum on December 12 — two full days before Bob Diachenko discovered the exposed server on December 14. By the time responsible disclosure began, the data was already in the hands of malicious actors. This highlights that exposed databases are typically found by threat actors before researchers, and security through obscurity (hoping no one finds an open server) is not a viable strategy.

5. Phone Number Exposure Enables Physical-World Attacks

Unlike email addresses (which primarily enable digital attacks), phone numbers bridge the gap to physical-world threats. They enable SIM swapping, voice phishing (vishing), and even physical location tracking. The exposure of 267 million phone numbers linked to real names represented a risk that extends far beyond the digital realm.

6. Data Minimization on Collection, Not Just Storage

Facebook's decision to allow phone number lookups via its API was a product design choice that prioritized user discovery over privacy. Even after the API was restricted, the damage was done. Organizations must evaluate the scraping risk of every API endpoint at design time, not after data has been collected at scale by third parties.

Technical Details

Exposure Vector: Unsecured Elasticsearch Server

The 267 million records were stored on an Elasticsearch cluster hosted in the United States with no authentication mechanism. Elasticsearch is an open-source search and analytics engine commonly used for log analysis, application search, and data warehousing. In versions prior to 6.8 and 7.1, Elasticsearch did not enable security features by default, meaning any instance exposed to the internet was accessible without credentials.

Server details:

  • Location: United States
  • Database type: Elasticsearch
  • Authentication: None (publicly accessible)
  • Discovery method: Indexed by BinaryEdge on December 4, 2019
  • Takedown: December 19, 2019
  • Exposure window: Approximately 15 days (from indexing to takedown)

Data Origin: Facebook API Scraping

The dataset was most likely compiled using Facebook's developer API before April 2018, when Facebook restricted access to phone number lookups. The scraping technique exploited the phone number search functionality:

  1. Phone number enumeration: Automated scripts generated lists of phone numbers (e.g., by iterating through country code + area code + sequential numbers)
  2. API lookup: Each phone number was submitted to Facebook's search/lookup API
  3. Profile matching: For numbers linked to Facebook accounts, the API returned the associated user ID and name
  4. Data aggregation: Results were collected into a structured database

This technique could process millions of phone numbers per day, depending on rate limiting. Prior to 2018, Facebook's rate limiting on this endpoint was insufficient to prevent large-scale scraping.

Database Structure

The exposed Elasticsearch index contained records with the following fields:

  • facebook_id — Unique Facebook user identifier
  • phone_number — Phone number linked to the Facebook account
  • full_name — User's full name as displayed on their Facebook profile

The simplicity of the dataset (only three fields) is consistent with API scraping output — the scraper extracted only the data returned by the phone number lookup endpoint.

Elasticsearch Security Context

Elasticsearch security has been a persistent problem across the internet:

  • Default configuration: Prior to version 6.8/7.1, Elasticsearch shipped without authentication enabled
  • Common exposure: Shodan and BinaryEdge regularly identify thousands of publicly accessible Elasticsearch instances
  • No encryption: Without explicit TLS configuration, all data is transmitted in plaintext
  • Recommended configuration: Enable X-Pack Security (built-in since 6.8), enforce TLS, restrict to internal network access via firewall rules, and use role-based access control

Attribution

The identity of the individual or group that compiled the scraped dataset and hosted it on the Elasticsearch server remains unknown. The data was likely scraped by a third party (not Facebook itself) using automated tools against Facebook's API. Whether the Elasticsearch server was intentionally public (for sharing the data) or accidentally misconfigured is also unclear.

Frequently Asked Questions

How many Facebook users were affected?

267 million Facebook users had their user IDs, phone numbers, and full names exposed. The records were stored on an unsecured Elasticsearch server that was publicly accessible without any authentication from at least December 4 to December 19, 2019.

Who was responsible?

The identity of the person or group who scraped the data and hosted it on the Elasticsearch server is unknown. The data was likely collected by abusing Facebook's developer API before April 2018, when Facebook restricted phone number lookup functionality. A third party compiled the data and stored it on a server without security controls.

Was this a hack?

No. This was a combination of API scraping (collecting data that Facebook's API made available) and a database misconfiguration (storing the scraped data on a server without authentication). No hacking or exploitation of security vulnerabilities was involved in either the data collection or the exposure.

Is this the same as the 540 million Facebook breach?

No. This is a separate incident. The 540 million record exposure (disclosed April 2019) involved data from third-party app developers Cultura Colectiva and At the Pool, stored on misconfigured Amazon S3 buckets. That dataset contained different data types (comments, likes, reactions, friends lists, plaintext passwords). The 267 million record exposure involved scraped phone numbers and names on an Elasticsearch server. Different data, different source, different cause.

Is this the same as the 533 million phone number leak in 2021?

No. The 533 million record exposure disclosed in April 2021 involved a different scraping technique (exploiting Facebook's contact importer feature) and a different dataset. While both involved phone numbers linked to Facebook profiles, they were compiled at different times using different methods. The 2021 incident led to a EUR 265 million fine from the Irish Data Protection Commission against Meta.

Were passwords exposed?

No. The exposed database contained only Facebook user IDs, phone numbers, and full names. No passwords, email addresses, private messages, or other account credentials were included.

What is the risk of phone number exposure?

Exposed phone numbers linked to real names enable several attack types: SMS phishing (smishing) using personalized messages, phone spam and robocalls, SIM swapping attacks to bypass SMS-based two-factor authentication, and voice phishing (vishing) calls. The combination of a phone number with a full name and Facebook profile makes social engineering attacks significantly more convincing.

What should affected users do?

Be vigilant about unsolicited SMS messages, especially those claiming to be from banks, delivery services, or Facebook itself. Never click links in unexpected text messages. Consider switching from SMS-based two-factor authentication to an authenticator app (Google Authenticator, Authy) or hardware security key, as SIM swapping attacks can intercept SMS codes. Review your Facebook privacy settings to limit what information is publicly visible on your profile.

Back to Breach Database
Breach data sourced from Wikipedia: List of data breaches, licensed under CC BY-SA 3.0.

Protect Your Organization From Data Breaches

Our security experts can help you identify vulnerabilities and strengthen your defenses.