OWASP Top 10 for LLM applications
If you are shipping an LLM feature and need one checklist to start your threat model, the OWASP Top 10 for LLM Applications is it. It is maintained by the OWASP GenAI Security Project, written by practitioners, and maps neatly onto the controls you can actually build. This doc walks through the 2025 list, explains how the newer Top 10 for Agentic Applications fits alongside it, and turns both into an engineering plan.
Why it matters
Security reviewers, auditors and enterprise customers increasingly ask "how do you address the OWASP LLM Top 10?" in questionnaires. Having a clear answer, per risk, with a named control and an owner, shortens sales cycles and catches real bugs. More importantly, the list encodes lessons from production incidents: almost every item corresponds to something that has already happened to someone.
How it works
The 2025 edition reflected the shift toward RAG and tool-calling apps. Prompt injection kept the top spot, and two new entries appeared: System Prompt Leakage and Vector and Embedding Weaknesses.
| ID | Risk | One-line control |
|---|---|---|
| LLM01:2025 | Prompt Injection | Treat all model input as untrusted; constrain what the model can do after reading it |
| LLM02:2025 | Sensitive Information Disclosure | Minimise data in context, redact, enforce access control before retrieval |
| LLM03:2025 | Supply Chain | Pin and verify models, datasets and plugins |
| LLM04:2025 | Data and Model Poisoning | Provenance and validation for training and RAG data |
| LLM05:2025 | Improper Output Handling | Encode, validate and sandbox model output before it reaches other systems |
| LLM06:2025 | Excessive Agency | Least-privilege tools, human approval for high-impact actions |
| LLM07:2025 | System Prompt Leakage | Never put secrets or authorisation logic in prompts |
| LLM08:2025 | Vector and Embedding Weaknesses | Tenant isolation and permission filters in the vector store |
| LLM09:2025 | Misinformation | Grounding, citations, uncertainty and human review |
| LLM10:2025 | Unbounded Consumption | Rate limits, token budgets, timeouts, cost alerts |
In December 2025 the same project published the OWASP Top 10 for Agentic Applications for 2026, with identifiers ASI01 to ASI10. It focuses on failure classes specific to autonomous agents: goal and plan manipulation, tool misuse, identity and privilege abuse, agent supply chain, unexpected code execution, memory poisoning, insecure inter-agent communication, cascading failures, human-agent trust exploitation and rogue agents. If your system calls tools or runs multi-step plans, apply both lists.
The way I use these lists is to map each risk to where it lives in the request path:
Rendering diagram…
Reference architecture
A baseline secure architecture for an LLM feature puts deterministic controls around the model, because the model itself cannot be trusted to enforce policy.
Rendering diagram…
The key design rule: authorisation decisions are made in code using the user's identity, never by the model and never by instructions in the prompt. The model can request an action; the policy engine decides.
Code
Improper Output Handling (LLM05) is the risk teams most often forget, because it looks like ordinary web security. Model output is untrusted input to whatever consumes it. This TypeScript helper validates structured output with Zod and renders markdown safely instead of injecting raw HTML.
import { z } from "zod";
import { marked } from "marked";
import DOMPurify from "isomorphic-dompurify";
const TicketAction = z.object({
action: z.enum(["reply", "escalate", "close"]),
ticketId: z.string().regex(/^T-\d{6}$/),
message: z.string().max(4000),
});
export function parseModelAction(raw: string) {
// never eval, never pass to a shell, never trust ids without re-checking access
const parsed = TicketAction.safeParse(JSON.parse(raw));
if (!parsed.success) throw new Error("Model output failed schema validation");
return parsed.data;
}
export function renderModelMarkdown(md: string): string {
const html = marked.parse(md, { async: false }) as string;
// strip scripts, event handlers and javascript: links that an injected prompt could produce
return DOMPurify.sanitize(html, { FORBID_TAGS: ["img", "iframe", "form"] });
}
Blocking images matters more than it looks: a markdown image pointing at an attacker's URL with data in the query string is a classic exfiltration channel after prompt injection.
Trade-offs and pitfalls
- Treating the list as a compliance tick-box. The value is in the threat model, not in having a row per item in a spreadsheet.
- Relying on the system prompt for security. Assume it will leak (LLM07). Put secrets in the backend and enforce permissions in code.
- Shared vector indexes. Multi-tenant RAG without per-tenant filtering (LLM08) leaks data between customers through retrieval.
- Ignoring cost as a security issue. Unbounded consumption is how a scraper or a looping agent turns into a five-figure bill.
- Agent risks are different. Memory poisoning and tool misuse do not show up in a chat-only threat model. Use the agentic list for agent features.
- No owner per risk. Each item needs a named owner and a test, or it decays.
Checklist
- Map each of LLM01 to LLM10 to a specific control and owner in your system.
- Apply the Agentic Top 10 (ASI01 to ASI10) for any feature that calls tools.
- Enforce authorisation in code with the end user's identity.
- Validate and encode all model output before it reaches browsers, databases or shells.
- Isolate tenants in retrieval and vector storage.
- Set token budgets, rate limits and cost alerts.
- Re-review when you add a tool, a data source or a new model.