QID 150727
Date Published: 2023-10-17
QID 150727: Error Based NoSQL MongoDB Injection
Qualys WAS scanner observed a NoSQL MongoDB-based error message while performing injection tests. The message will indicate presence of NoSQL statement in the web application. The web application may or may not be exploitable. NoSQL injection enables an attacker to modify the syntax of the query to retrieve, corrupt or delete data. This is accomplished by manipulating query criteria in a manner that affects the query's logic. The typical causes of this vulnerability are lack of input validation and insecure construction of the query. Queries created by concatenating strings with NoSQL syntax and user-supplied data are prone to this vulnerability. If any part of the string concatenation can be modified, then the meaning of the query can be changed.
The scope of a NoSQL injection exploit varies greatly. If any malicious statement can be injected into the query, then the attacker has the equivalent access of a database administrator. This access could lead to theft of data, malicious corruption of data, or deletion of data.
Construct queries using parameterized queries or prepared statements. Leverage in-built MongoDB libraries that has rich support for parameterized queries.
CVEs related to QID 150727
| Advisory ID | Software | Component | Link |
|---|