PCI v3.2-6.5.1
CWE-943
HIPAA-164.306(a), 164.308(a)
OWASP 2013-A1
OWASP 2017-A1
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Blind MongoDB Injection

Severity:
High
Summary

Invicti detected that the application is vulnerable to a Time Based MongoDB injection. MongoDB injections occur when applications don't check or sanitize user input, which is then interpreted by a MongoDB database.

Invicti confirmed the vulnerability by executing test queries on the backend database. In these tests, MongoDB injection was not obvious, but the different responses from the page based on our tests allowed us to identify and confirm the MongoDB injection.

Impact

Depending on the backend database, the database connection settings, and the operating system, an attacker can mount one or more of the following attacks successfully:

  • Reading, updating and deleting arbitrary data or tables from the database
  • Collect sensitive information about the backend server configuration

Remediation

To avoid this vulnerability;

  • Sanitize and strictly check the type of user-supplied input.
  • Avoid using where, mapReduce and group operators with user input.
  • If possible set javascriptEnabled to false in mongod.conf.
  • Use the most recent version of MongoDB.
Required Skills for Successful Exploitation

There are numerous freely available tools to exploit SQL injection vulnerabilities. This is a complex area with many dependencies; however, it should be noted that the numerous resources available in this area have raised both attacker awareness of the issues and their ability to discover and leverage them. SQL injection is one of the most common web application vulnerabilities.

Actions To Take

  1. See the remedy for solution.
  2. If you are not using a database access layer (DAL), consider using one. This will help you centralize the issue. You can also use ORM (object relational mapping). Most of the ORM systems use only parameterized queries and this can solve the whole SQL injection problem.
  3. Locate the all dynamically generated SQL queries and convert them to parameterized queries. (If you decide to use a DAL/ORM, change all legacy code to use these new libraries.)
  4. Use your weblogs and application logs to see if there were any previous but undetected attacks to this resource.

Vulnerability Index

You can search and find all vulnerabilities

Select Vulnerability
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Featured resources

Blog

Strengthening enterprise application security: Invicti acquires Kondukto

Blog

Modern AppSec KPIs: Moving from scan counts to real risk reduction

Blog

Friends don’t let friends shift left: Shift smarter with DAST-first AppSec

Blog

Vibe talking: Dan Murphy on the promises, pitfalls, and insecurities of vibe coding

Blog

What lies ahead for CMS.

Blog

How to integrate CMS with other tools.

Blog

Improve user experience through CMS.

Blog

How CMS can benefit e-commerce.

Blog

Stay updated on CMS trends.

Blog

Tips for improving CMS performance.

Blog

Learn how to secure your CMS.

Blog

Explore the advantages of CMS.

Blog

A comprehensive guide to CMS.

Build your resistance to threats. And save hundreds of hours each month.