nosql-injection

Identify NoSQL injection vulnerabilities in JSON-based application inputs.

1.6k|234|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill nosql-injection-wgpsec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nosql-injection
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/exploit/nosql-injection
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill nosql-injection-wgpsec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

NoSQL injection assessment and exploitation methodology for MongoDB-like backends, enabling security testers to identify login bypasses, data leakage risks, and misconfigurations in applications that accept JSON-based input.

Core Features & Use Cases

  • Phase 1: Authentication bypass via operator injection to bypass login checks and access restricted data.
  • Phase 2: Data extraction techniques (blind regex, JS $where, and aggregation pipeline injections) to retrieve sensitive information.
  • Phase 3: Advanced abuse vectors including MongoDB SSRF, shell injection, and CouchDB-specific vulnerabilities.
  • Use cases include testing login forms, REST APIs, and admin panels that improperly incorporate user input into NoSQL queries.

Quick Start

Run a targeted login-bypass test against a test endpoint to validate NoSQL injection susceptibility.

Frequently Asked Questions about nosql-injection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bypass authentication in MongoDB using NoSQL injection?

MongoDB authentication bypass is achieved through operator injection, sending JSON payloads with operators like $ne or $gt in login flows to force the query to return true and access restricted data.

What is NoSQL injection and how does it affect JSON-based REST APIs?

NoSQL injection is a vulnerability where user input influences database queries in JSON-based REST APIs, allowing testers to manipulate query operators and exfiltrate sensitive information from the backend engine.

How to extract data from MongoDB using blind regex and $where injections?

Data extraction from MongoDB utilizes blind regex injections, JavaScript $where operator abuse, and aggregation pipeline injections to systematically retrieve sensitive information from the database backend.

Does NoSQL injection work on CouchDB and what advanced abuse vectors exist?

NoSQL injection advanced abuse vectors include MongoDB SSRF, shell injection, and CouchDB-specific vulnerabilities, expanding beyond data extraction to target internal network resources and execute commands.

When should I test for NoSQL operator injections like $regex and $lookup?

Testing for NoSQL operator injections using $regex, $lookup, $ne, and $where is required when applications improperly incorporate JSON user input into login forms, REST APIs, or aggregation pipelines.