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

Most organizations want security vendor consolidation

4 min read - Cybersecurity is complicated, to say the least. Maintaining a strong security posture goes far beyond knowing about attack groups and their devious TTPs. Merely understanding, coordinating and unifying security tools can be challenging.We quickly passed through the “not if, but when” stage of cyberattacks. Now, it’s commonplace for companies to have experienced multiple breaches. Today, cybersecurity has taken a seat in core business strategy discussions as the risks and costs have risen dramatically.For this reason, 75% of organizations seek to…

How IBM secures the U.S. Open

2 min read - More than 15 million tennis fans around the world visited the US Open app and website this year, checking scores, poring over statistics and watching highlights from hundreds of matches over the two weeks of the tournament. To help develop this world-class digital experience, IBM Consulting worked closely with the USTA, developing powerful generative AI models that transform tennis data into insights and original content. Using IBM watsonx, a next-generation AI and data platform, the team built and managed the entire…

How the FBI Fights Back Against Worldwide Cyberattacks

5 min read - In the worldwide battle against malicious cyberattacks, there is no organization more central to the fight than the Federal Bureau of Investigation (FBI). And recent years have proven that the bureau still has some surprises up its sleeve. In early May, the U.S. Department of Justice announced the conclusion of a U.S. government operation called MEDUSA. The operation disrupted a global peer-to-peer network of computers compromised by malware called Snake. Attributed to a unit of the Russian government Security Service,…

How NIST Cybersecurity Framework 2.0 Tackles Risk Management

4 min read - The NIST Cybersecurity Framework 2.0 (CSF) is moving into its final stages before its 2024 implementation. After the public discussion period to inform decisions for the framework closed in May, it’s time to learn more about what to expect from the changes to the guidelines. The updated CSF is being aligned with the Biden Administration’s National Cybersecurity Strategy, according to Cherilyn Pascoe, senior technology policy advisor with NIST, at the 2023 RSA Conference. This sets up the new CSF to…