December 21, 2015 By Larry Loeb 2 min read

John Matherly, the creator of the Shodan search engine for Internet-connected devices, recently took to his Shodan blog to discuss a new perspective on open-source MongoDB databases. His blog was in response to recent publicity about vulnerabilities, especially those that could be linked to leaked data about MacKeeper users.

Researchers Find Vulnerabilities

Matherly found 35,000 publicly accessible and potentially insecure instances of MongoDB. A significant portion of the databases are hosted on Amazon, Digital Ocean and Aliyun, Alibaba’s cloud computing service. All the exposed databases combined account for 684.8 TB of data, according to the researcher.

Matherly noted that the newer versions of MongoDB (newer than 3.0) only listen for data requests on localhost by default. However, users may be upgrading to this version without changing an insecure pre-existing configuration file or providing a firewall to protect the database. Some may even be changing settings themselves to revert to a less secure but more convenient option.

It should be remembered that just because it is a publicly accessible database does not automatically make it insecure. Much of the responsibility falls to the administrators, but these databases can be set up securely and still be publicly available.

Not Just a MongoDB Problem

This very real problem is caused by people putting naked servers straight onto the Internet with no security measures in place. For example, there doesn’t seem to be any good reason for a server to expose port 27017, which is the port number used to access MongoDB by default, yet some users still do it

The same sort of problem can happen to programs like Redis, CouchDB, Cassandra and Riak, which are equally impacted by these sorts of misconfigurations. In fact, experts have found database vulnerabilities in these platforms relatively recently, prompting more attention and scrutiny on the subject.

How to Mitigate the Issue

Users can test an installation to see if open ports are present by using the database client. If any.blog.com has a MongoDB in it, type in “$mongo any.blog.com:27017”. If the database gives output, the port is wide open.

MongoDB provides security mechanisms, but if they are not used, there is nothing that can help. Security must be actively enabled to work. Many hosting agents have additional measures, as well; Amazon EC2 is secure by default, for instance. If there are issues, that means the database is being manually configured to allow access.

Digital Ocean, however, is wide open by default. The company has issued a series of steps to lock down databases. Just don’t forget to leave ports 80, 443 and 22 open for HTTP, HTTPS and SSH services when configuring security.

More from

How a new wave of deepfake-driven cybercrime targets businesses

5 min read - As deepfake attacks on businesses dominate news headlines, detection experts are gathering valuable insights into how these attacks came into being and the vulnerabilities they exploit.Between 2023 and 2024, frequent phishing and social engineering campaigns led to account hijacking and theft of assets and data, identity theft, and reputational damage to businesses across industries.Call centers of major banks and financial institutions are now overwhelmed by an onslaught of deepfake calls using voice cloning technology in efforts to break into customer…

Grandoreiro banking trojan unleashed: X-Force observing emerging global campaigns

16 min read - Since March 2024, IBM X-Force has been tracking several large-scale phishing campaigns distributing the Grandoreiro banking trojan, which is likely operated as a Malware-as-a-Service (MaaS). Analysis of the malware revealed major updates within the string decryption and domain generating algorithm (DGA), as well as the ability to use Microsoft Outlook clients on infected hosts to spread further phishing emails. The latest malware variant also specifically targets over 1500 global banks, enabling attackers to perform banking fraud in over 60 countries…

New cybersecurity sheets from CISA and NSA: An overview

4 min read - The Cybersecurity and Infrastructure Security Agency (CISA) and National Security Agency (NSA) have recently released new CSI (Cybersecurity Information) sheets aimed at providing information and guidelines to organizations on how to effectively secure their cloud environments.This new release includes a total of five CSI sheets, covering various aspects of cloud security such as threat mitigation, identity and access management, network security and more. Here's our overview of the new CSI sheets, what they address and the key takeaways from each.Implementing…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today