OWASP Top 10 for LLM Applications
The 2025 OWASP risks for LLM and GenAI applications, including prompt injection, sensitive information disclosure, excessive agency and unbounded consumption, with architectural mitigations.
OWASP Top 10 for LLM Applications (2025)
| # | Risk | Mitigations |
|---|---|---|
| LLM01 | Prompt Injection (direct and indirect via documents, web pages, tool outputs) | Treat external content as untrusted data; separate instructions from data; injection classifiers; least-privilege tools; human approval for consequential actions |
| LLM02 | Sensitive Information Disclosure | Permission-aware retrieval, PII redaction, data minimization in prompts and logs, no secrets in prompts |
| LLM03 | Supply Chain | Vetted model sources, model cards, signed artifacts, dependency scanning for AI libraries |
| LLM04 | Data and Model Poisoning | Provenance of training/fine-tuning and RAG data, validation, anomaly detection |
| LLM05 | Improper Output Handling | Encode/sanitize outputs before rendering; never execute model output directly (SQL, shell, code) without validation |
| LLM06 | Excessive Agency | Minimal tool set and scopes, per-user delegated permissions, approval steps, rate limits |
| LLM07 | System Prompt Leakage | Assume prompts can be extracted; keep secrets and authorization logic out of prompts |
| LLM08 | Vector and Embedding Weaknesses | Access control in vector stores, tenant isolation, poisoning checks on ingested content |
| LLM09 | Misinformation | Grounding with citations, evaluation, uncertainty communication, human review for high-stakes outputs |
| LLM10 | Unbounded Consumption | Token and request quotas, max context sizes, timeouts, cost monitoring |
Defence-in-depth architecture
flowchart LR U[User input] --> IG[Input guardrails<br/>injection & PII detection, policy] IG --> ORCH[Orchestrator] ORCH --> RET[Retrieval with ACL filters] RET --> CTX[Context: untrusted, delimited] ORCH --> LLM[LLM] CTX --> LLM LLM --> TOOLS[Tool gateway<br/>scoped tokens, approvals] LLM --> OG[Output guardrails<br/>grounding, PII, safety] OG --> RENDER[Safe rendering] ORCH --> LOG[(Audit logs & traces)]
Key point on prompt injection
There is no complete technical fix for prompt injection today. Architecture must assume the model can be manipulated and limit what a manipulated model can do: restrict tools, require confirmation for writes, enforce authorization outside the model, and isolate untrusted content.
Interview questions and answers
An email assistant reads incoming emails and can send emails. What is the risk?
Indirect prompt injection: a malicious email instructs the assistant to forward sensitive messages. Mitigate by treating email content as data, requiring user confirmation before sending, restricting recipients, detecting injection patterns, and logging actions.