I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
MongoDB remote command execution vulnerability: nightmare or eye opener?
11–20 of 28 posts
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#12I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
I suspect a lot of people are using MongoDB as the database backend to their web applications or services, so they are probably being indirectly exposed to the Internet. (Just like your Postgres or MySQL database.)
The same goes for my use of MongoDB.
Though I am curious if anything similar exists for CouchDB, as they seem to be encouraging dangerous configurations like that.
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#13I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#14I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
By default, I believe MongoDB listens on 0.0.0.0 which means that servers unprotected from a firewall will expose their MongoDB database to the Internet. Shodan confirms that there are at least 31,000 public instances of MongoDB on the Internet at the moment (source: http://www.shodanhq.com/search?q=port%3A28017 ).
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#15Most DBs allow something similar to this though it's generally locked down by default.
For PostgreSQL you can do it via untrusted languages though by default only super users can use those: http://www.postgresql.org/docs/9.1/static/plperl-trusted.htm...
For Oracle here's a bunch of ways to accomplish the same thing though again, by default, all are blocked for non-DBA users: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTI...
Note that there are some times when it's useful to be able to execute misc things like this. About 6 or 7 years back I wrote something on Oracle that would execute shell commands to get iostat/vmstat output and save it on regular intervals. Could have been done from outside in (data gets pushed from unix => DB) but having it initiated by the DB itself let us control when it runs based on DB actions (triggers, DBMS_JOBs, etc). To get that setup though we had to whitelist the executables we were calling as by default on Oracle everything is blocked. It's not a common thing to do and I think it's sensible that things like that should be locked down by default.
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#16Earlier quoted context omitted.
I suspect a lot of people are using MongoDB as the database backend to their web applications or services, so they are probably being indirectly exposed to the Internet. (Just like your Postgres or MySQL database.)
I've never exposed a Postgres or MySQL database directly to the internet, either. They're always listening to localhost connections only, and the only code that gets to make direct calls into them is my code, which means input sanitization prevents attacks like this. The same goes for my use of MongoDB. Though I am curious if anything similar exists for CouchDB, as they seem to be encouraging dangerous configurations…
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#17I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
By default, I believe MongoDB listens on 0.0.0.0 which means that servers unprotected from a firewall will expose their MongoDB database to the Internet. Shodan confirms that there are at least 31,000 public instances of MongoDB on the Internet at the moment (source: http://www.shodanhq.com/search?q=port%3A28017 ).
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#18Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#19I guess this is only a real problem if you're exposing your MongoDB instance to the internet.
I suspect a lot of people are using MongoDB as the database backend to their web applications or services, so they are probably being indirectly exposed to the Internet. (Just like your Postgres or MySQL database.)
Re: MongoDB remote command execution vulnerability: nightmare or eye opener?
#20Earlier quoted context omitted.
By default, I believe MongoDB listens on 0.0.0.0 which means that servers unprotected from a firewall will expose their MongoDB database to the Internet. Shodan confirms that there are at least 31,000 public instances of MongoDB on the Internet at the moment (source: http://www.shodanhq.com/search?q=port%3A28017 ).
It sounds like they listen on localhost by default ( http://docs.mongodb.org/manual/reference/mongod/#options ), though i'm not sure if that's always been the case. It's also possible installers change the default behaviour. (i.e. when you install via apt, yum, homebrew, etc.)