A05: Injection

Identify and mitigate SQL, OS command, NoSQL, and template injection vulnerabilities in web applications.

1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/ninjacoder88/masterpassword-open --skill a05-injection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: A05: Injection
Source: https://github.com/ninjacoder88/masterpassword-open/tree/main/security/skills/owasp-injection
Command: npx skills add https://github.com/ninjacoder88/masterpassword-open --skill a05-injection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Injection vulnerabilities occur when an application sends untrusted user input to an interpreter and the interpreter executes parts of that input as commands. This leads to data compromise, unauthorized access, and potential remote code execution across SQL, OS command, NoSQL, and template languages.

Core Features & Use Cases

  • Reference: Provides a comprehensive overview of injection types (SQL, OS command, NoSQL, template injections) and related attack patterns.
  • Prevention guidance: Outlines mitigations such as parameterized queries, input validation, escaping, and secure coding practices.
  • Use case: A developer can review code to locate dynamic query construction and replace it with safe APIs.

Quick Start

Identify untrusted input paths and ensure they are processed through safe APIs and parameterized interfaces.

Frequently Asked Questions about A05: Injection

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

FAQPage Schema
What is an injection vulnerability and how does user input exploit it?

An injection vulnerability occurs when untrusted user input is sent to an interpreter that executes it as commands. This enables attacks like SQL, OS command, NoSQL, and template injections, leading to data compromise or remote code execution.

How do I prevent SQL injection when building dynamic queries?

To prevent SQL injection, replace dynamic query construction with parameterized queries and safe APIs. You must also implement context-aware escaping and strict input validation across all API endpoints and forms that accept user-supplied data.

What's the best way to fix OS command and NoSQL injection flaws in web applications?

The best way to fix OS command and NoSQL injection flaws is to identify untrusted input paths and process them through safe APIs and parameterized interfaces. This requires context-aware escaping and secure coding practices across your tech stack.

Do I need parameterized queries for all API endpoints to stop injection attacks?

Yes, you need parameterized queries for all API endpoints, forms, and dynamic query builders that handle user-supplied input. Combining parameterized interfaces with input validation and context-aware escaping mitigates injection risks across various tech stacks.

When should I use context-aware escaping instead of input validation alone?

You should use context-aware escaping alongside input validation when untrusted data reaches interpreters like SQL, OS commands, NoSQL, or template engines. Escaping ensures the interpreter treats the input strictly as data, preventing execution of injected commands.

Why does input validation fail to stop template injection in dynamic query builders?

Input validation fails to stop template injection when dynamic query builders pass untrusted input directly to template interpreters. Without context-aware escaping and parameterized interfaces, the interpreter executes parts of the input as commands, bypassing basic validation.