Generated banner for Owasp LLM
Generated logo for Owasp LLM

Owasp LLM

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Guidelines
  • Security
  • CC-BY-SA-4.0
  • No issues found

From the author

OWASP Top 10 for LLM Applications (2025) knowledge base for identifying, assessing, and remediating large language model security risks.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The owasp-llm skill provides a machine-readable implementation of the OWASP Top 10 for LLM Applications (2025). It serves as a comprehensive reference for developers and security professionals to understand, detect, and mitigate vulnerabilities inherent in large language model systems. Each of the ten identified risks is documented with detailed descriptions, risk assessments, vulnerability checklists, and actionable prevention and remediation strategies.

What it does

  • Provides a structured index of the 2025 OWASP LLM Top 10 vulnerabilities.
  • Offers detailed breakdowns for each vulnerability, including risk impact and attack scenarios.
  • Includes specific vulnerability checklists to help identify system exposure.
  • Supplies defensive measures and remediation guidance for each security risk.
  • Categorizes risks into logical groups like Input Integrity, Data Protection, and Access Control.

When to use it

  • During the design phase of an LLM-integrated application to implement security by design.
  • When performing a security audit or risk assessment of an existing LLM system.
  • To train development teams on common LLM-specific security threats.
  • When developing remediation plans for identified security vulnerabilities in AI workflows.

Advantages

  • Standardized, industry-recognized framework for LLM security.
  • Machine-readable format suitable for integration into automated security agents.
  • Covers both direct and indirect attack vectors, including multimodal risks.
  • Provides clear, actionable steps for both detection and long-term remediation.

Usage examples

“What are the primary risks associated with Prompt Injection according to the OWASP LLM Top 10?”
The agent retrieves the LLM01:2025 documentation, detailing direct and indirect injection risks, potential consequences like data exfiltration, and a checklist for identifying exposure.
“How can I prevent Excessive Agency in my LLM agent?”
The agent references LLM06:2025, providing guidance on enforcing least privilege, implementing human-in-the-loop requirements for high-risk actions, and defining strict capability boundaries.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/owasp-llm/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip owasp-llm.zip -d .agents/skills

Documentation by Microsoft

OWASP® LLM Top 10 — Skill Entry

This SKILL.md is the entrypoint for the OWASP LLM Top 10 skill.

The skill encodes the OWASP Top 10 for LLM Applications (2025) as structured, machine-readable references that an agent can query to identify, assess, and remediate security risks in large language model systems.

Normative references (LLM Top 10)

  1. 00 Vulnerability Index

  2. 01 Prompt Injection

  3. 02 Sensitive Information Disclosure

  4. 03 Supply Chain

  5. 04 Data and Model Poisoning

  6. 05 Improper Output Handling

  7. 06 Excessive Agency

  8. 07 System Prompt Leakage

  9. 08 Vector and Embedding Weaknesses

  10. 09 Misinformation

  11. 10 Unbounded Consumption

Skill layout

  • SKILL.md — this file (skill entrypoint).

  • references/ — the LLM Top 10 normative documents.

    • 00-vulnerability-index.md — index of all vulnerability identifiers, categories, and cross-references.

    • 01 through 10 — one document per vulnerability aligned with OWASP LLM Applications numbering.

Third-Party Attribution

Copyright © OWASP Foundation. OWASP® Top 10 for LLM Applications (2025) 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-llm-applications-2025/ 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

references/07-system-prompt-leakage.md


title: 'LLM07: System Prompt Leakage' description: OWASP LLM Top 10 reference for system prompt leakage risks exposing sensitive configuration and behavioral instructions

07 System Prompt Leakage

Identifier: LLM07:2025 Category: Configuration Security

Description

The system prompt leakage vulnerability refers to the risk that the system prompts or instructions used to steer the model's behavior can contain sensitive information not intended to be discovered. System prompts are designed to guide the model's output based on the requirements of the application, but may inadvertently contain secrets. When discovered, this information can be used to facilitate other attacks.

The system prompt should not be considered a secret, nor should it be used as a security control. Sensitive data such as credentials, connection strings, and similar must not be contained within the system prompt.

The fundamental security risk is not the disclosure of the prompt wording itself. The risk lies in the underlying elements: sensitive information disclosure, system guardrails bypass, and improper separation of privileges. Even if exact wording is not disclosed, attackers interacting with the system can determine many guardrails and formatting restrictions by observing the model's behavior.

Risk

  • Exposure of sensitive system architecture, API keys, database credentials, or user tokens enabling unauthorized access.

  • Disclosure of internal decision-making processes allowing attackers to exploit weaknesses or bypass controls such as transaction limits or loan amounts.

  • Revelation of content filtering criteria enabling attackers to craft targeted bypass attempts.

  • Disclosure of internal role structures or permission levels enabling privilege escalation attacks.

  • Facilitation of further attacks such as remote code execution through extracted guardrail bypass information.

Vulnerability checklist

  • System prompt contains sensitive information such as API keys, database credentials, connection strings, or user tokens.

  • System prompt reveals internal decision-making processes or business logic that should be kept confidential.

  • System prompt contains content filtering criteria that could be extracted and exploited by attackers.

  • System prompt reveals role structures or permission levels of the application.

  • Security controls such as privilege separation and authorization checks depend on system prompt instructions rather than deterministic external enforcement.

  • Behavior control relies on system prompt instructions rather than independent guardrail systems outside the LLM.

Prevention controls

  1. Separate sensitive data from system prompts by externalizing API keys, authentication keys, database names, user roles, and permission structures to systems the model does not directly access.

  2. Avoid reliance on system prompts for strict behavior control. Since LLMs are susceptible to prompt injection which can alter the system prompt, rely on systems outside the LLM to ensure behavior control, such as external systems for detecting and preventing harmful content.

  3. Implement a system of guardrails outside of the LLM itself. An independent system that inspects output to determine compliance is preferable to system prompt instructions.

  4. Ensure security controls are enforced independently from the LLM. Critical controls such as privilege separation, authorization bounds checks, and similar must not be delegated to the LLM. These controls need to occur in a deterministic, auditable manner. In cases where an agent is performing tasks requiring different access levels, use multiple agents each configured with least privileges.

Example attack scenarios

Scenario A — Credential extraction

An LLM has a system prompt containing credentials for a tool it has been given access to. The system prompt is leaked to an attacker, who then uses these credentials for other purposes.

Scenario B — Guardrail bypass

An LLM has a system prompt prohibiting the generation of offensive content, external links, and code execution. An attacker extracts this system prompt and then uses a prompt injection attack to bypass these instructions, facilitating a remote code execution attack.

Detection guidance

  • Test whether system prompt content can be extracted through direct queries or prompt injection techniques designed to elicit system instructions.

  • Review system prompts for embedded sensitive data such as credentials, API keys, or connection strings.

  • Observe model behavior patterns to determine if guardrails and formatting restrictions can be inferred without direct prompt disclosure.

  • Inspect LLM outputs for inadvertent disclosure of system prompt content or internal decision-making logic.

  • Audit whether security controls depend on system prompt instructions rather than independent external enforcement.

Remediation

  • Remove all sensitive data from system prompts, externalizing API keys, authentication credentials, database names, and permission structures to systems the model does not directly access.

  • Implement independent guardrail systems outside the LLM that inspect output for compliance rather than relying on system prompt instructions.

  • Enforce security controls such as privilege separation and authorization bounds checks independently from the LLM in deterministic, auditable systems.

  • Use multiple agents with least privileges when tasks require different access levels rather than embedding role information in system prompts.

  • Rotate any credentials or API keys that were previously embedded in system prompts.


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-llm · 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-llm.zip