NoSQL Injection in loopback-connector-mongodb
Summary
GHSA-m734-r4g6-34f9: NoSQL Injection in loopback-connector-mongodb. Affects loopback-connector-mongodb versions < 3.6.0. Fixed in 3.6.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
loopback-connector-mongodb is a MongoDB connector for LoopBack, a highly-extensible, open-source Node.js framework for building APIs and microservices. It allows developers to connect their LoopBack applications to MongoDB databases, enabling data storage and retrieval. However, versions prior to 3.6.0 of loopback-connector-mongodb are vulnerable to NoSQL injection.
Vulnerability Detail
NoSQL injection is a type of injection attack that targets NoSQL databases, such as MongoDB. In the case of loopback-connector-mongodb, the vulnerability arises from the failure to properly sanitize a filter passed to query the database. This allows the dangerous $where property to be passed to the MongoDB Driver, which can execute JavaScript code on the database. This feature, while intended by MongoDB, can be exploited by malicious actors to perform unauthorized operations or execute arbitrary code on the database. An example of a malicious query is provided in the vulnerability details.
How To Fix
Latest published version: 8.0.3 as of 23 Oct 2026
npm install loopback-connector-mongodb@8.0.3
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.6.0
This is the first release that contains the fix.
npm install loopback-connector-mongodb@3.6.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. Updating to the fixed version is the recommended solution.
Conclusion
The NoSQL injection vulnerability in loopback-connector-mongodb can be mitigated by updating to version 3.6.0 or later. It is important to promptly apply this fix to prevent potential unauthorized operations or code execution on the MongoDB database. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for loopback-connector-mongodb →
FAQ
NoSQL injection is a type of injection attack that targets NoSQL databases, allowing attackers to manipulate queries and potentially execute unauthorized operations or arbitrary code.
loopback-connector-mongodb is a MongoDB connector for LoopBack, a Node.js framework for building APIs and microservices.
The vulnerability arises from the failure to properly sanitize a filter passed to query the database, allowing the $where property to be passed to the MongoDB Driver.
An attacker can exploit this vulnerability to perform unauthorized operations or execute arbitrary code on the MongoDB database.
To fix this vulnerability, update loopback-connector-mongodb to version 3.6.0 or later.
References
Related vulnerabilities
Recent vulnerabilities recorded for loopback-connector-mongodb.