mongo is vulnerable to NoSQL Injection
61
Medium Risk
GridFS read, delete, and abort operations in the mongo gem build MongoDB filters directly from a caller supplied file ID without requiring an exact match. A Hash value such as one containing a $gt or MinKey operator is interpreted as query criteria instead of a literal identifier, so a single ID lookup can match chunks belonging to other files in the bucket. This lets a Hash shaped ID disclose the contents of unrelated files or delete chunks across the whole bucket instead of just the intended file. The fix wraps every ID in $eq across the read, delete, and abort paths so only exact matches apply.
You are affected if you are using a version that falls within the vulnerable range and you pass externally influenced values as GridFS file IDs.
mongo is vulnerable to NoSQL Injection in versions 0.0.1 - 2.25.0.
Upgrade the mongo library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.