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 has a MongoDB in it, type in “$mongo”. 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

Who Carries the Weight of a Cyberattack?

Almost immediately after a company discovers a data breach, the finger-pointing begins. Who is to blame? Most often, it is the chief information security officer (CISO) or chief security officer (CSO) because protecting the network infrastructure is their job. Heck, it is even in their job title: they are the security officer. Security is their responsibility. But is that fair – or even right? After all, the most common sources of data breaches and other cyber incidents are situations caused…

Transitioning to Quantum-Safe Encryption

With their vast increase in computing power, quantum computers promise to revolutionize many fields. Artificial intelligence, medicine and space exploration all benefit from this technological leap — but that power is also a double-edged sword. The risk is that threat actors could abuse quantum computers to break the key cryptographic algorithms we depend upon for the safety of our digital world. This poses a threat to a wide range of critical areas. Fortunately, alternate cryptographic algorithms that are safe against…

Abuse of Privilege Enabled Long-Term DIB Organization Hack

From November 2021 through January 2022, the Cybersecurity and Infrastructure Security Agency (CISA) responded to an advanced cyberattack on a Defense Industrial Base (DIB) organization’s enterprise network. During that time frame, advanced persistent threat (APT) adversaries used an open-source toolkit called Impacket to breach the environment and further penetrate the organization’s network. Even worse, CISA reported that multiple APT groups may have hacked into the organization’s network. Data breaches such as these are almost always the result of compromised endpoints…

How Do You Plan to Celebrate National Computer Security Day?

In October 2022, the world marked the 19th Cybersecurity Awareness Month. October might be over, but employers can still talk about awareness of digital threats. We all have another chance before then: National Computer Security Day. The History of National Computer Security Day The origins of National Computer Security Day trace back to 1988 and the Washington, D.C. chapter of the Association for Computing Machinery’s Special Interest Group on Security, Audit and Control. As noted by National Today, those in…