hunting-nosql-operator-and-where-injection

hunting-nosql-operator-and-where-injection is a skill for Claude Code from UnboundCompute/security-agent-skills. It costs 171 tokens per session (1,952 once invoked), scanned A, original, MIT.

A security review for document, key-value, and other non-relational databases where request data becomes query structure. It checks whether an input object can introduce query operators or server-side expressions.

In plain words
What is it for?
Use it to review login checks, request-built filters, aggregation queries, map-reduce functions, and database expressions such as MongoDB's $where.
Why use it?
A value expected to be a simple string or number may arrive as an object and change the meaning of a query. Some database features can also evaluate server-side code when untrusted input reaches them.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the security-agent-skills plugin — 194 skills shipped together

Good fit Use it to review login checks, request-built filters, aggregation queries, map-reduce functions, and database expressions such as MongoDB's $where.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add UnboundCompute/security-agent-skills --skill hunting-nosql-operator-and-where-injection
Clone the repo
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills

Made for: Claude Code.

Or install security-agent-skills, the plugin that ships this one along with the rest of its 194 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hunting-nosql-operator-and-where-injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection/github.svg)](https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection)
Your own site
<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hunting-nosql-operator-and-where-injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection"><img src="https://agentmods.dev/badge/skills/unboundcompute/security-agent-skills/hunting-nosql-operator-and-where-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 171 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00171 $0.01952
Opus 5 $0.00086 $0.00976
Sonnet 5 $0.00034 $0.00390
Haiku 4.5 $0.00017 $0.00195

Measured 7d ago against content hash 5622a517d80f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hunting-nosql-operator-and-where-injection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hunting-nosql-operator-and-where-injection/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hunting NoSQL operator and where injection: when a value arrives as an operator

NoSQL injection rarely looks like classic SQL injection because there is no string to concatenate. Instead, a document store filter is often built directly from a request object, so if the attacker sends an object where the code expected a scalar, its keys become query operators. A login check that compares a password to a request field can be turned always-true by sending an operator that matches anything. Worse, some stores evaluate server-side JavaScript, in a $where clause, a mapReduce function, or an aggregation expression, and untrusted input reaching that path is code execution inside the database. You find these by separating filters that bind scalar values from those that accept a request-shaped object or an expression, and tracing untrusted input into the latter.

When to use

  • Data access uses a document, key-value, or wide-column store with request-built query filters.
  • A request field expected to be a scalar could arrive as an object whose keys become operators.
  • Untrusted input can reach a server-side JavaScript evaluation: $where, mapReduce, or an aggregation.

Scope check

Test NoSQL injection only against databases and applications you own or are authorized to assess, on non-production data. A confirming operator or expression can read or alter records outside the intended scope, so stay inside the authorized boundary. If you can't name the authorization, stop.

The loop

  1. Establish the query sinks and split them. Inventory where the store is queried, then separate calls that bind scalar values from calls that accept a request-shaped filter object or evaluate a server-side expression. This is the false-positive killer: a query with typed scalar parameters cannot be operator- injected. Name the structure-accepting and expression-evaluating sinks first.

  2. Trace untrusted input into filter objects. Follow request bodies and query strings into filters built from them. The key question is whether a field expected to be a scalar can arrive as an object: if the code does find({ user: req.body.user }) and req.body.user can be an object, the attacker sends an operator that changes the match. Confirm whether the value is type-checked to a scalar before use.

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 134 lines · 171 tokens per session scan A 5622a517d80f

Subscribe to this mod's changes

hunting-nosql-operator-and-where-injection is a skill published in the GitHub repository UnboundCompute/security-agent-skills (5 stars, last pushed 3d ago), licensed MIT. It adds 171 tokens to every session and 1,952 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

prodcheck-review

Review this codebase against the prodcheck pre-production checklists — security, performance, scale, integrations and post-launch readiness. Use when asked to check whether a project is ready to ship, to audit an area before launch, or to work through a specific checklist. Produces evidence with file:line citations…

FarzamHabibi/pre-production-checklist · 70 tokens

api-11-nosql-injection

API NoSQL injection testing: MongoDB operator injection ($ne, $gt, $regex, $where), blind NoSQL via $regex character extraction, JSON body injection in REST APIs, and GraphQL NoSQLi via filter arguments. Use when testing APIs using MongoDB or other NoSQL databases.

vigilantshield/Claude-HunterKit · 69 tokens

nosqli

NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB / Firebase / Redis attack patterns, auth bypass, blind extraction.

MingyiSecLab/Mingyi-Atlas · 38 tokens

integrate-arcjet-guard-google-adk

Integrate Arcjet security into a Google ADK JS app using @arcjet/guard — put guardPlugin first on Runner({ plugins }) so beforeToolCallback gates tools, and read a caller-owned id from helper options or context. Use when asked to add Arcjet to Google ADK, @google/adk, rate limit its tools, screen inbound messages, or…

arcjet/arcjet-js · 111 tokens

integrate-arcjet-guard-mastra

Integrate Arcjet security into a Mastra agent using @arcjet/guard — wrap createTool execute, screen input/output with a Processor tripwire, and gate unwrapped MCP/workspace tools with hooks. Use when asked to add Arcjet to a Mastra agent, rate limit its tools, screen inbound messages, or block prompt injection / PII.

arcjet/arcjet-js · 82 tokens

adr-skill

Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses…

Agent-Threat-Rule/agent-threat-rules · 89 tokens