AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The owasp-mcp skill provides a comprehensive, machine-readable reference for the OWASP MCP Top 10 (2025). It is designed to help developers and security professionals identify, assess, and remediate common security vulnerabilities inherent in Model Context Protocol architectures. By structuring these risks into standardized documents, the skill enables AI agents to perform security audits, provide defensive guidance, and suggest remediation strategies for issues ranging from credential mismanagement to tool poisoning and shadow server deployment.
What it does
- Provides a structured index of the OWASP MCP Top 10 security vulnerabilities.
- Offers detailed descriptions, impact assessments, and vulnerability checklists for each risk.
- Supplies defensive design patterns and prevention controls for MCP architectures.
- Includes realistic attack scenarios to help visualize potential exploitation paths.
- Provides actionable detection signals and remediation steps for security incidents.
When to use it
- During the design phase of an MCP server or client to implement secure-by-design principles.
- When auditing an existing MCP implementation for potential security gaps.
- To train or prompt an AI agent to assist in identifying security risks within an MCP-based workflow.
- When responding to a suspected security incident involving MCP tool calls or context sharing.
Advantages
- Aligned with industry-standard OWASP security research.
- Structured for machine-readability, making it ideal for AI-assisted security analysis.
- Covers a broad spectrum of risks specific to the Model Context Protocol ecosystem.
- Provides clear, actionable remediation guidance for developers.
Usage examples
- “What are the security risks associated with tool poisoning in an MCP environment?”
- The agent will reference the MCP03:2025 documentation to explain the risks of tool poisoning, provide a checklist for identifying vulnerable configurations, and suggest prevention controls.
- “How can I prevent secret exposure in my MCP server implementation?”
- The agent will retrieve the MCP01:2025 reference to outline best practices such as using secure vaults, enforcing short-lived tokens, and implementing log redaction.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/owasp-mcp/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip owasp-mcp.zip -d .agents/skills
Documentation by Microsoft
OWASP® MCP Top 10 — Skill Entry
This SKILL.md is the entrypoint for the MCP Vulnerabilities skill.
The skill encodes the OWASP MCP Top 10 (2025) as structured, machine-readable references that an agent can query to identify, assess, and remediate MCP security risks.
Normative references (MCP Top 10)
Skill layout
SKILL.md— this file (skill entrypoint).references/— the MCP Top 10 normative documents.00-vulnerability-index.md— index of all vulnerability identifiers, severities, and cross-references.01through10— one document per vulnerability aligned with OWASP MCP numbering.
Third-Party Attribution
Copyright © OWASP Foundation. OWASP® MCP Top 10 content is derived from works by the OWASP Foundation, licensed under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Source: https://owasp.org/www-project-mcp-top-10/ Modifications: Vulnerability descriptions restructured into agent-consumable reference documents with added detection and remediation guidance. OWASP® is a registered trademark of the OWASP Foundation. Use does not imply endorsement.
Files
- ATTRIBUTION.mdAdded by AutoGineer973 B
- LICENSEAdded by AutoGineer17.9 KiB
- SKILL.md2.5 KiB
- references/00-vulnerability-index.md2.7 KiB
- references/01-token-mismanagement-secret-exposure.md3.8 KiB
- references/02-privilege-escalation-scope-creep.md3.7 KiB
- references/03-tool-poisoning.md3.9 KiB
- references/04-supply-chain-attacks-dependency-tampering.md4.0 KiB
- references/05-command-injection-execution.md4.4 KiB
- references/06-prompt-injection-contextual-payloads.md3.8 KiB
- references/07-insufficient-authentication-authorization.md4.1 KiB
- references/08-lack-of-audit-telemetry.md4.1 KiB
- references/09-shadow-mcp-servers.md4.1 KiB
- references/10-context-injection-over-sharing.md3.6 KiB
references/05-command-injection-execution.md
title: 'MCP05: Command Injection and Execution' description: OWASP MCP Top 10 reference for command injection vulnerabilities including shell execution and unsanitized input patterns
05 Command Injection and Execution
Identifier: MCP05:2025 Category: Injection
Description
Command injection in MCP environments occurs when an AI agent constructs and executes system commands, shell scripts, API calls, or code snippets using untrusted input without proper validation or sanitization. Unlike traditional command injection where attackers directly control input fields, MCP-based injection is mediated through the model layer. The agent interprets natural language instructions and translates them into executable operations, creating a unique attack surface where prompt-driven execution, dynamic command construction, tool-mediated execution, and chained execution converge. Agents operate autonomously and often with elevated privileges, so successful injection can lead to complete system compromise, data exfiltration, or lateral movement.
Impact
Arbitrary code execution with agent privileges.
Data exfiltration of sensitive files, databases, or environment variables.
System compromise through backdoors, rootkits, or persistent access mechanisms.
Privilege escalation via SUID binaries, sudo misconfigurations, or service accounts.
Denial of service through fork bombs, infinite loops, or system shutdowns.
Lateral movement using compromised MCP servers as pivot points.
Supply chain poisoning of build pipelines, CI/CD systems, or deployment artifacts.
Regulatory violations from unauthorized system modifications or data access.
Vulnerability checklist
Agents construct shell commands by concatenating user input without escaping.
Tool implementations pass agent outputs directly to exec(), system(), eval(), or shell=True.
No input validation exists for parameters before system calls.
Model-generated code is automatically executed without sandboxing or human review.
File path operations accept unsanitized input allowing directory traversal.
API or database calls use string interpolation rather than parameterized queries.
Agent outputs are not constrained to allowlists of permitted commands.
Special characters (;, |, &, $(), backticks) are not stripped or escaped.
Environment variables or secrets are accessible through command substitution.
No runtime sandboxing isolates tool execution from the host system.
Tools run with excessive privileges (root, admin, or broad service accounts).
Prevention controls
Use allowlists for permitted commands, arguments, and file paths.
Reject shell metacharacters (; | & $() <> && || backticks).
Normalize and validate all file paths to block traversal.
Never use shell=True, eval(), exec(), or string-built commands.
Execute with structured parameters (e.g., subprocess.run(['ls', 'logs'])).
Disable direct execution of model-generated code unless manually reviewed.
Run tools inside containers, micro-VMs, gVisor/Kata, or jailed users.
Enforce timeouts, resource limits, and read-only file systems.
Run tools as non-root with minimal filesystem, API, and DB permissions.
Require human approval for destructive, privileged, or system-modifying operations.
Example attack scenarios
Scenario A — Shell metacharacter injection
A user asks an agent to "list files in the logs directory" but appends "; cat /etc/passwd". The agent generates "ls logs; cat /etc/passwd" and the tool executes it as a single shell command.
Scenario B — API parameter injection
An attacker submits input containing SQL injection payload. The agent constructs an unparameterized query and the injection destroys the database.
Detection signals
Shell metacharacters detected in tool parameters or logs.
Execution of sudo, su, or SUID binaries by agent processes.
Outbound connections from agent hosts to unknown domains.
Access to sensitive paths (/etc/passwd, /root, /proc/, ~/.ssh).
Abnormal syscall patterns detected by Falco, auditd, or osquery.
CPU spikes, memory exhaustion, or disk I/O storms from malicious scripts.
Remediation
Terminate active sessions where injection is detected.
Revoke compromised agent credentials.
Audit all recent tool executions for unauthorized commands.
Patch tool implementations to use parameterized execution.
Deploy sandboxing and least-privilege enforcement.
Requirements and compatibility
Written for: GitHub Copilot, Claude Code
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Claude Code frontmatter, Needs an MCP server
Security
What our scanner noticed· Medium risk
- References to credential files
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/hve-core · .github/skills/security/owasp-mcp · commit f425e94
- Licence
- Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
- LICENSE (written by AutoGineer)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download owasp-mcp.zip