MongoDB
Breach Date
January 1, 2019
Records Affected
202,000,000
Verified
Yes
Source
wikipedia
Summary
In 2019, security researchers identified a massive wave of unsecured MongoDB instances that collectively exposed over 202 million records containing personal information. This incident is distinct from the targeted Indian job seeker database exposure (mongodb-2019) and represents the broader epidemic of MongoDB misconfigurations that plagued the internet from 2017 through 2019. The exposed databases were operated by numerous unidentified parties and contained a variety of personal data — including names, email addresses, phone numbers, physical addresses, and in many cases detailed professional or financial information.
The root cause was a fundamental design decision in older versions of MongoDB: prior to version 2.6.0 (released in 2014), the database shipped with authentication disabled by default and listened on all network interfaces. This meant that anyone who installed MongoDB and deployed it to a cloud server without explicitly configuring security had created a publicly accessible database. Researchers estimated that over 60,000 MongoDB instances were exposed to the internet during this period, with many containing sensitive personal, medical, financial, or corporate data.
The situation escalated dramatically when automated attack groups — including "Unistellar," "Cru3lty," and others — began systematically scanning for and targeting these exposed databases. These groups would connect to unprotected instances, export or delete the data, and leave ransom notes demanding Bitcoin payment for data recovery. In many cases, the attackers did not actually retain the data and simply destroyed it. The MongoDB exposure epidemic became a defining case study in the consequences of insecure defaults, the shared responsibility model of cloud security, and the dangers of deploying database systems without security hardening.
Breach Details
- Breach Date
- January 1, 2019
- Records Affected
- 202,000,000
- Source
- Wikipedia
- Verified
- Verified
- Industry
- Technology
- Type
- Poor Security
Impact Analysis
Scale of Impact
- 202 million records exposed in this particular cluster of incidents
- 60,000+ MongoDB instances estimated to be publicly accessible during the 2017-2019 period
- Multiple attack groups systematically targeted exposed databases
- Owners often unidentifiable — many exposed databases could not be attributed to specific organizations
Data Types Exposed
Across the wave of exposed MongoDB instances, data types varied widely but commonly included:
- Email addresses
- Full names
- Phone numbers
- Physical addresses
- IP addresses
- Usernames and hashed passwords
- Financial records
- Professional and employment data
- Customer records and transaction histories
Risk Assessment
| Risk Category | Severity | Description |
|---|---|---|
| Identity theft | Critical | Aggregated personal data from multiple sources enables comprehensive identity fraud |
| Credential stuffing | Critical | Exposed credentials (even hashed) can be tested against other services at scale |
| Financial fraud | High | Financial records and transaction data enable targeted financial crimes |
| Phishing | High | Detailed personal profiles enable highly convincing phishing campaigns |
| Data destruction | High | Ransom groups destroyed data in many databases, causing permanent data loss for operators |
| Regulatory exposure | Medium | Operators of exposed databases faced potential GDPR, CCPA, and other regulatory penalties |
Systemic Characteristics
This exposure event was not a single breach but a systemic failure affecting the entire MongoDB ecosystem:
- Default insecurity: MongoDB's default configuration made exposure the path of least resistance
- Cloud amplification: Easy cloud deployment meant inexperienced operators could deploy internet-facing databases in minutes
- No centralized response: With thousands of independent operators, there was no coordinated incident response
- Discovery asymmetry: Researchers and attackers could find exposed instances faster than operators could secure them
- Ransom destruction: Many databases were destroyed by ransom groups before owners were even aware of the exposure
Timeline
- Pre-2014: MongoDB ships with authentication disabled by default and binds to all network interfaces (
0.0.0.0) - March 2014: MongoDB 2.6.0 released — begins addressing default security configuration, but existing installations remain unaffected
- December 2016: Security researcher Victor Gevers discovers thousands of exposed MongoDB instances; first wave of "MongoDB Apocalypse" ransom attacks begins
- January 2017: Ransom attacks escalate — groups including "Harak1r1," "Kraken," and others wipe over 28,000 MongoDB databases and demand Bitcoin ransoms
- 2017-2018: Researchers continuously identify exposed MongoDB instances containing sensitive data from healthcare providers, financial services, retailers, and government agencies
- November 2018: MongoDB 4.0 defaults to binding only to localhost, significantly reducing new exposures
- Early 2019: The "Unistellar" group begins a systematic campaign targeting remaining exposed MongoDB instances
- 2019: Multiple researchers, including Bob Diachenko, identify exposed MongoDB databases containing over 202 million records collectively
- May 2019: Unistellar and other groups continue destroying exposed databases, with some estimates suggesting over 12,000 databases wiped in a single campaign
- 2019-2020: MongoDB Atlas (managed cloud service) grows rapidly, as organizations shift to a platform with security enabled by default
- 2021: MongoDB 5.0 and later versions enforce authentication and localhost binding as non-negotiable defaults
Lessons Learned
1. Secure Defaults Are a Software Vendor Responsibility
The MongoDB exposure epidemic was fundamentally caused by insecure default settings. When authentication is optional and disabled by default, a significant percentage of deployments will remain unprotected. Software vendors must ship secure configurations out of the box — requiring users to explicitly weaken security rather than explicitly enable it. MongoDB's eventual fix (binding to localhost, requiring authentication) should have been the default from the start.
2. The Cloud Shared Responsibility Model Requires Education
Many MongoDB exposures occurred because operators deployed databases on cloud infrastructure (AWS, Azure, GCP) without understanding that the cloud provider secures the infrastructure, not the application. Security groups, network ACLs, and database authentication are the operator's responsibility. Cloud providers and database vendors must invest in onboarding education and default-secure deployment templates.
3. Internet-Wide Scanning Changes the Threat Landscape
Tools like Shodan, BinaryEdge, and Censys made it trivial to discover every MongoDB instance on the internet. This capability, available to both researchers and attackers, means that any misconfigured service is discovered within hours — not days or weeks. Organizations must assume that every internet-facing service is being continuously scanned and tested.
4. Data Without Access Controls Will Be Found and Exploited
The ransom groups that targeted MongoDB instances demonstrated that unprotected data on the internet is not a theoretical risk but a certainty. Automated scanning and exploitation tools mean that misconfigured databases are compromised in hours. The question is not whether an exposed database will be found, but how quickly.
5. Managed Services Eliminate Entire Categories of Risk
The shift from self-managed MongoDB to MongoDB Atlas (and similar managed services) eliminated the misconfiguration risk entirely. Managed databases include authentication, encryption, network isolation, and monitoring by default. For organizations without dedicated database security expertise, managed services are not a convenience — they are a security necessity.
6. Ransom Attacks on Databases Require Offline Backups
Many operators who lost data to ransom groups had no backups — or their backups were also on exposed infrastructure. The MongoDB ransom campaigns reinforced the critical importance of offline, tested backups that cannot be reached by an attacker who compromises the primary database.
Technical Details
Root Cause: Insecure Default Configuration
The technical root cause of the MongoDB exposure epidemic was a combination of default settings in MongoDB versions prior to 4.0:
- No authentication by default: MongoDB did not require a username or password to connect and access data
- Binding to all interfaces: The database listened on
0.0.0.0(all network interfaces), making it reachable from any IP address - Default port exposure: MongoDB's standard port (27017) was well-known and trivially scannable
- No encryption: Data was transmitted in plain text by default
Attack Pattern: MongoDB Ransom Groups
Multiple groups systematically targeted exposed MongoDB instances using a consistent methodology:
1. SCAN: Use Shodan/BinaryEdge/Masscan to identify port 27017 listeners
2. PROBE: Attempt unauthenticated connection to each instance
3. ASSESS: If successful, enumerate databases and estimate data value
4. EXPORT: Optionally copy data for later extortion
5. DELETE: Drop all databases and collections
6. RANSOM: Create a new collection containing a ransom note:
{"your_data_is_backed_up": "send 0.2 BTC to [address] to recover"}
7. REPEAT: Move to next target (automated, processing thousands per day)
Notably, many ransom groups did not actually export the data before deleting it — victims who paid the ransom received nothing. This "delete-and-bluff" approach was revealed when researchers tracked ransom Bitcoin wallets and found payments that were never followed by data returns.
Known Attack Groups
| Group | Estimated Databases Hit | Period | Notes |
|---|---|---|---|
| Harak1r1 | 28,000+ | Jan 2017 | First large-scale MongoDB ransom campaign |
| Kraken | 16,000+ | Jan-Feb 2017 | Demanded 1 BTC per database |
| Cru3lty | 10,000+ | 2017-2018 | Targeted smaller databases |
| Unistellar | 12,000+ | 2018-2019 | Systematic late-stage campaign |
Scale of Exposure
Internet-wide scans during the peak period revealed the scale of the problem:
- 2017: Approximately 99,000 MongoDB instances publicly accessible (Shodan data)
- 2018: Approximately 67,000 instances accessible (partial improvement from new defaults)
- 2019: Approximately 45,000 instances still exposed (legacy installations persisted)
- 2020+: Significant decline as MongoDB Atlas adoption grew and older versions were retired
Version History of Security Fixes
| MongoDB Version | Year | Security Change |
|---|---|---|
| Pre-2.6.0 | Pre-2014 | No auth, binds to 0.0.0.0 |
| 2.6.0 | 2014 | Warning added for no-auth deployments |
| 3.6.0 | 2017 | Default bind changed to localhost |
| 4.0 | 2018 | Authentication enforced for non-localhost connections |
| 5.0+ | 2021 | Authentication required by default in all configurations |
Discovery and Research
The MongoDB exposure epidemic was documented by numerous security researchers:
- Victor Gevers (GDI Foundation) — first to systematically catalog exposed MongoDB instances in 2016
- Bob Diachenko (Comparitech/SecurityDiscovery) — discovered many of the largest individual exposures in 2018-2019
- Chris Vickery (UpGuard) — identified several high-profile MongoDB exposures affecting government and enterprise data
- Shodan (search engine) — provided the scanning infrastructure that made both discovery and exploitation possible
Frequently Asked Questions
How many records were exposed in the MongoDB incidents?
This particular cluster of incidents exposed over 202 million records. However, the broader MongoDB exposure epidemic (2017-2019) affected tens of thousands of databases containing billions of records collectively. Individual exposures ranged from a few thousand records to hundreds of millions.
Who was responsible for the exposed databases?
The exposed databases belonged to thousands of independent operators — from small startups and individual developers to large enterprises and government agencies. Many could not be attributed to specific organizations because the database contents did not clearly identify the owner. The underlying cause was MongoDB's insecure default configuration combined with insufficient security knowledge among database operators.
How were the databases discovered?
Security researchers and attackers alike used internet scanning tools (Shodan, BinaryEdge, Censys, Masscan) to identify MongoDB instances listening on port 27017. Because these instances had no authentication, anyone could connect and browse the data. Discovery of an exposed instance typically took hours, not days.
What happened to the data in exposed databases?
Many exposed databases were targeted by automated ransom groups that deleted the data and left ransom notes demanding Bitcoin payment. In many cases, the attackers did not actually copy the data before deleting it, meaning the data was permanently destroyed. Other databases may have been quietly downloaded by unknown parties without any visible indication of compromise.
Why was MongoDB insecure by default?
MongoDB's original design philosophy prioritized ease of development and deployment. Requiring authentication would have added friction to the initial developer experience. This trade-off — developer convenience over security — proved catastrophic at scale. MongoDB has since reversed course, making authentication mandatory in newer versions.
Is MongoDB safe to use today?
Yes, when properly configured. MongoDB versions 5.0 and later require authentication by default. MongoDB Atlas (the managed cloud service) includes authentication, encryption, network isolation, and monitoring out of the box. The security issues that caused the 2017-2019 epidemic have been addressed, but operators running older, self-managed versions must still explicitly configure security.
Were the ransom groups ever caught?
No major arrests have been publicly reported in connection with the MongoDB ransom campaigns. The use of Bitcoin for ransom payments and the global distribution of both attackers and targets made attribution and prosecution extremely difficult. The attacks were largely automated, allowing small groups to target thousands of databases with minimal effort.
How can organizations prevent similar exposures?
The most effective prevention measures are: (1) use managed database services with built-in security, (2) enable authentication on all database instances, (3) bind databases to localhost or private network interfaces only, (4) use firewalls and security groups to restrict access by IP, (5) regularly scan your own infrastructure for exposed services using the same tools attackers use, and (6) maintain offline backups that cannot be reached by an attacker who compromises the database.
Protect Your Organization From Data Breaches
Our security experts can help you identify vulnerabilities and strengthen your defenses.