Skip to content
Pwnversity
AI-LLMintermediate · 6 min · upd. 2026-10

LLM security (OWASP LLM Top 10)

OWASP LLM01

Integrating a language model (LLM) into an application adds a new attack surface: the input is unstructured natural language, the model usually has access to data and tools, and instructions and data mix in the same text channel. This page is the entry point to the area: it summarizes the OWASP Top 10 for LLM Applications (2025 edition) and how to reason about the risk of an LLM app before getting into specific techniques.

Before testing anything, map the application’s real architecture, not the abstract “chatbot”.

  • Assets: system prompt, context data, other users’ data, credentials/tokens used by the tools, and the model and its weights.
  • Actors: malicious end user (direct injection), a third party who controls content the LLM will read (indirect injection via RAG, email, web), a compromised model/dataset/plugin provider (supply chain).
  • Surface: the input channel, all retrieved external content, the tools/plugins the model can invoke, and the downstream systems that consume its output.
  • Trust: the baseline rule is that LLM output is untrusted input to the rest of the system, just as an anonymous user’s input would be.
  • The instruction/data boundary blurs: the prompt and external content share the same channel, and the model can’t reliably tell which is an order and which is data.
  • The output is non-deterministic and hard to validate; the model is trained to “want” to obey and complete the task.
  • It often has access to tools and data (RAG, plugins, agents), so a textual manipulation can turn into a real, impactful action.
  • There is excessive trust from users and developers in the output (“the AI said so”), which amplifies the harm of wrong or manipulated responses.
ID Risk Key idea
LLM01 Prompt Injection Inject instructions, direct or indirect (Prompt injection)
LLM02 Sensitive Information Disclosure Leak of prompt, context, or training data
LLM03 Supply Chain Compromised third-party models, datasets, or plugins
LLM04 Data and Model Poisoning Poison training or fine-tuning data (Data poisoning)
LLM05 Improper Output Handling Trusting output without validation, causing downstream XSS/SSRF/RCE
LLM06 Excessive Agency The agent can do too much: excess permissions or autonomy
LLM07 System Prompt Leakage Exposure of the system prompt and secrets embedded in it
LLM08 Vector and Embedding Weaknesses RAG flaws: index poisoning, cross-tenant leakage
LLM09 Misinformation Hallucinations and wrong answers that are blindly trusted
LLM10 Unbounded Consumption Unbounded resource use: cost, DoS, model extraction

The 2025 edition reorganizes the 2023 list: for example it splits out System Prompt Leakage (LLM07) and Vector and Embedding Weaknesses (LLM08), and renames the old DoS as Unbounded Consumption.

Almost all the risk comes from untrusted data entering the context and from output being able to trigger actions.

flowchart LR
    U[User] --> APP[App / Orchestrator]
    EXT[(External content:\nweb, docs, email)] --> VDB[(Vector store / RAG)]
    VDB --> APP
    APP --> LLM[LLM]
    LLM --> TOOLS[Tools / APIs]
    TOOLS --> SYS[(Systems: email, DB, payments)]
    LLM --> OUT[Output] --> U
    OUT --> DOWN[Downstream systems]
  • RAG: retrieved content is untrusted and may carry hidden instructions, enabling indirect injection (Prompt injection).
  • Agents: the LLM calls tools/APIs; with too much agency, an injected instruction becomes an action (LLM06).
  • Plugins/tools: treat LLM output as untrusted input to those systems (LLM05).
  • Data: don’t put secrets in the system prompt expecting the model to “not reveal them” (LLM07).

How to test an LLM application, always on your own systems or with authorized scope (see AI red teaming):

  • Enumerate the architecture: which tools the model has, which data it touches, which external content it retrieves.
  • Test direct and indirect injection and measure whether the system prompt can be leaked or actions induced.
  • Check output handling: is it rendered as HTML without escaping (XSS), passed to an HTTP client (SSRF), or to an interpreter (RCE)?
  • Assess agency: can the agent chain tools into an impactful action without human approval?
  • Map findings to MITRE ATLAS as you map to ATT&CK in classic pentesting (ATT&CK).
  • Apply the OWASP LLM Top 10 as a design checklist and treat output as untrusted (LLM05): validate and encode before using it downstream.
  • Least privilege and less agency in agents and plugins; human approval for impactful actions (send, delete, pay).
  • Defenses against prompt injection (Prompt injection), especially indirect in RAG.
  • Allow-lists of tools and domains, rate/cost limits (LLM10), and no secrets in the context.
  • Monitor inputs, outputs, and actions (Detection, SIEM), continuous AI red teaming, and model governance (NIST AI RMF, Risk management).
  • Map architecture: tools, data, and external content the model touches
  • Review against the OWASP LLM Top 10 (2025)
  • Treat LLM output as untrusted input (validate/encode downstream)
  • Test direct and indirect prompt injection (Prompt injection)
  • Least privilege in tools/plugins; human approval for sensitive actions
  • Verify no secrets in the context or the system prompt
  • Rate/cost limits (unbounded consumption) and monitoring
  • AI red teaming (AI red teaming) and model governance