Owasp Agentic
MicrosoftOfficialPublished by Microsoft
- Skill
- Guidelines
- Security
- CC-BY-SA-4.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The owasp-agentic skill provides a machine-readable implementation of the OWASP Top 10 for Agentic Applications (2026). It serves as a comprehensive reference for developers and security professionals to understand, detect, and mitigate critical vulnerabilities inherent in autonomous AI agent systems. The skill is organized into a vulnerability index and individual reference documents for each of the ten identified risk categories, offering actionable guidance on prevention, detection, and remediation.
What it does
- Provides structured, machine-readable definitions for the OWASP Agentic Top 10 security risks.
- Offers vulnerability checklists to help identify potential security gaps in agentic workflows.
- Includes prevention controls and remediation strategies for each identified vulnerability.
- Details attack scenarios to illustrate how agentic systems can be exploited.
- Facilitates integration into security auditing and threat modeling processes for AI agents.
When to use it
- During the design and architecture phase of building an AI agent system.
- When performing security audits or threat modeling on existing agentic applications.
- When developing guardrails or safety protocols for autonomous AI agents.
- When training development teams on secure AI agent implementation practices.
Advantages
- Standardized security framework based on industry-recognized OWASP research.
- Machine-readable format allows for automated integration into agent development pipelines.
- Provides concrete, actionable remediation steps rather than just theoretical risks.
- Covers a wide range of agent-specific threats like goal hijacking and rogue agents.
Usage examples
- “What are the primary risks associated with Agent Goal Hijack according to the OWASP Agentic Top 10?”
- The agent retrieves the ASI01:2026 reference, explaining that goal hijack involves attackers manipulating an agent's objectives or decision pathways, and lists associated risks like unauthorized data exfiltration and financial fraud.
- “Provide a checklist to assess if my agent is vulnerable to Tool Misuse and Exploitation.”
- The agent references ASI02:2026 to provide a list of conditions and patterns that indicate potential tool misuse, along with recommended prevention controls like enforcing least privilege.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/owasp-agentic/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip owasp-agentic.zip -d .agents/skills
Documentation by Microsoft
OWASP® Agentic Top 10 — Skill Entry
This SKILL.md is the entrypoint for the OWASP Agentic Top 10 skill.
The skill encodes the OWASP Top 10 for Agentic Applications (2026) as structured, machine-readable references that an agent can query to identify, assess, and remediate security risks in AI agent systems.
Normative references (Agentic Top 10)
Skill layout
SKILL.md— this file (skill entrypoint).references/— the Agentic Top 10 normative documents.00-vulnerability-index.md— index of all vulnerability identifiers, categories, and cross-references.01through10— one document per vulnerability aligned with OWASP Agentic Security numbering.
Third-Party Attribution
Copyright © OWASP Foundation. OWASP® Top 10 for Agentic Applications (2026) 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://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/ 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 AutoGineer981 B
- LICENSEAdded by AutoGineer17.9 KiB
- SKILL.md2.6 KiB
- references/00-vulnerability-index.md3.1 KiB
- references/01-agent-goal-hijack.md6.4 KiB
- references/02-tool-misuse-and-exploitation.md6.1 KiB
- references/03-identity-and-privilege-abuse.md6.4 KiB
- references/04-agentic-supply-chain-vulnerabilities.md5.9 KiB
- references/05-unexpected-code-execution.md6.0 KiB
- references/06-memory-and-context-poisoning.md5.8 KiB
- references/07-insecure-inter-agent-communication.md6.4 KiB
- references/08-cascading-failures.md6.4 KiB
- references/09-human-agent-trust-exploitation.md6.5 KiB
- references/10-rogue-agents.md5.9 KiB
references/05-unexpected-code-execution.md
title: 'ASI05: Unexpected Code Execution' description: OWASP Agentic Top 10 reference for unexpected code execution where agents generate and run unintended or malicious code
05 Unexpected Code Execution
Identifier: ASI05:2026 Category: Execution Safety
Description
Agentic systems, including popular vibe coding tools, often generate and execute code. Attackers exploit code-generation features or embedded tool access to escalate actions into remote code execution (RCE), local misuse, or exploitation of internal systems. Because this code is often generated in real-time by the agent it can bypass traditional security controls.
Prompt injection, tool misuse, or unsafe serialization can convert text into unintended executable behavior. This entry focuses on unexpected or adversarial execution of code (scripts, binaries, JIT/WASM modules, deserialized objects, template engines, in-memory evaluations) that leads to host or container compromise, persistence, or sandbox escape. These outcomes require host and runtime-specific mitigations beyond ordinary tool-use controls.
Risk
Remote code execution enabling attackers to gain unauthorized access to host or container systems.
Deletion or overwriting of production data through unreviewed agent-generated commands.
Installation of hidden backdoors through hallucinated or adversarially influenced code.
Data exfiltration through shell command injection disguised as legitimate instructions.
Sandbox escape and persistence through multi-tool chain exploitation.
Supply chain compromise through dependency lockfile poisoning during automated build tasks.
Direct code execution through unsafe eval functions in agent memory systems.
Vulnerability checklist
Prompt injection can lead to execution of attacker-defined code by the agent.
Code hallucination can generate malicious or exploitable constructs that appear legitimate.
Shell command invocation can be triggered from reflected prompts without validation.
Unsafe function calls, object deserialization, or code evaluation are used without sanitization.
Exposed, unsanitized eval() functions powering agent memory have access to untrusted content.
Unverified or malicious package installs execute hostile code during installation or import.
Prevention controls
Apply input validation and output encoding to sanitize agent-generated code.
Prevent direct agent-to-production systems and operationalize use of vibe coding systems with pre-production checks including security evaluations, adversarial unit tests, and detection of unsafe memory evaluators.
Ban eval in production agents. Require safe interpreters and taint-tracking on generated code.
Never run as root. Run code in sandboxed containers with strict limits including network access. Restrict filesystem access to a dedicated working directory and log file diffs for critical paths.
Isolate per-session environments with permission boundaries. Apply least privilege. Fail secure by default. Separate code generation from execution with validation gates.
Require human approval for elevated runs. Keep an allowlist for auto-execution under version control. Enforce role and action-based controls.
Example attack scenarios
Scenario A — Vibe coding runaway execution
During automated self-repair tasks, an agent generates and executes unreviewed install or shell commands in its own workspace, deleting or overwriting production data.
Scenario B — Direct shell injection
An attacker submits a prompt containing embedded shell commands disguised as legitimate instructions. The agent processes the input and executes the embedded commands, resulting in unauthorized system access or data exfiltration.
Scenario C — Code hallucination with backdoor
A development agent tasked with generating security patches hallucinates code that appears legitimate but contains a hidden backdoor, potentially due to exposure to poisoned training data or adversarial prompts.
Scenario D — Multi-tool chain exploitation
An attacker crafts a prompt that causes the agent to invoke a series of tools in sequence (file upload, path traversal, dynamic code loading), ultimately achieving code execution through the orchestrated tool chain.
Scenario E — Memory system RCE
An attacker exploits an unsafe eval() function in the agent's memory system by embedding executable code within prompts. The memory system processes this input without sanitization, leading to direct code execution.
Scenario F — Dependency lockfile poisoning
The agent regenerates a lockfile from unpinned specs and pulls a backdoored minor version during fix-build tasks.
Detection guidance
Perform static scans on agent-generated code before execution to identify injection-prone patterns or known-vulnerable constructs.
Enable runtime monitoring to detect unexpected code execution, sandbox escape attempts, or privilege escalation.
Watch for prompt-injection patterns in agent inputs that could trigger code generation or execution.
Log and audit all code generation and execution events including parameters, environment, and outcomes.
Monitor for unsafe eval() usage or deserialization of untrusted objects in agent memory systems.
Remediation
Remove or replace all unsafe eval() functions and deserialization of untrusted objects in agent code.
Deploy sandboxed execution environments with strict filesystem, network, and privilege restrictions.
Implement validation gates between code generation and execution stages.
Add static analysis scanning to all agent-generated code before execution.
Enforce human approval for elevated or production-impacting code execution.
Pin dependencies by content hash and verify lockfile integrity before automated builds.
Content derived from works by the OWASP Foundation, licensed under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Modifications: Restructured into agent-consumable reference format with added detection and remediation guidance.
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
Security
No issues found by our static scan· No issues found
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-agentic · 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-agentic.zip