# NoSQL operator or query injection

An unexpected object, operator, or expression crosses a NoSQL query boundary.

**Candidate CWE:** [CWE-943](https://cwe.mitre.org/data/definitions/943.html)

## Test hypothesis

Use a local string-only filter with one synthetic matching row. Compare a scalar with an operator object, then change its operand to a nonexistent marker. Inspect the resulting filter and tenant predicate.

## Evidence required

The crafted value changes prohibited query semantics or removes a security constraint. Show the expected input contract, resulting query, and controlled data/action impact.

## Rule out false positives

An API intentionally exposing a constrained query language, an operator accepted only as text, or validation errors is not automatically vulnerable.

## Playbook and command references

- [Trace input into queries, commands, and templates](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/injection-tracing.html) — Prove interpretation at a specific sink using small paired experiments instead of payload spraying.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Trace%20input%20into%20queries%2C%20commands%2C%20and%20templates)

## Referenced by these target playbooks

[Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [PortSwigger NoSQL injection](https://portswigger.net/web-security/nosql-injection)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
