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

Third-party access: The overlooked risk to your data protection plan

2 min read - A recent IBM Cost of a Data Breach report reveals a startling statistic: Only 42% of companies discover breaches through their own security teams. This highlights a significant blind spot, especially when it comes to external partners and vendors.The financial stakes are steep. On average, a data breach affecting multiple environments costs a whopping $4.88 million. A major breach at a telecommunications provider in January 2023 served as a stark reminder of the risks associated with third-party relationships. In this…

Will arresting the National Public Data threat actor make a difference?

3 min read - The arrest of USDoD, the mastermind behind the colossal National Public Data breach, was a victory for law enforcement. It also raises some fundamental questions. Do arrests and takedowns truly deter cyberattacks? Or do they merely mark the end of one criminal’s chapter while others rise to take their place? As authorities continue to crack down on cyber criminals, the arrest of high-profile threat actors like USDoD reveals a deeper, more complex reality about the state of global cyber crime.…

What makes a trailblazer? Inspired by John Mulaney’s Dreamforce roast

4 min read - When you bring a comedian to offer a keynote address, you need to expect the unexpected.But it is a good bet that no one in the crowd at Salesforce’s Dreamforce conference expected John Mulaney to tell a crowd of thousands of tech trailblazers that they were, in fact, not trailblazers at all.“The fact that there are 45,000 ‘trailblazers’ here couldn’t devalue the title anymore,” Mulaney told the audience.Maybe it was meant as nothing more than a punch line, but Mulaney’s…

Topic updates

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