Sub topic 18
Using the OWASP Top 10 for LLM Applications as a checklist
This chapter assumes you have read the earlier chapters on prompt injection, tools and agents, and defense in depth. You will use the OWASP list to review an application you already understand.
What the list is
The OWASP Top 10 for LLM Applications is a community-maintained list of the most common risks in systems built on language models. It is not a standard you can pass or fail. It works as a review prompt: for each item, ask whether your application is exposed and what limits the damage.
The list is revised over time, and item numbers and names change between versions. The table below uses the 2025 edition. Check the current version before you cite item IDs in a report.
Mapping the list to this tutorial
| ID | Risk | Where this tutorial covered it |
|---|---|---|
| LLM01 | Prompt Injection | Direct and indirect injection, jailbreaking |
| LLM02 | Sensitive Information Disclosure | Data exfiltration, least privilege |
| LLM03 | Supply Chain | Not covered in depth |
| LLM04 | Data and Model Poisoning | Poisoned retrieval sources |
| LLM05 | Improper Output Handling | Treating model output as untrusted |
| LLM06 | Excessive Agency | Confused deputy, human approval |
| LLM07 | System Prompt Leakage | Prompts are not secrets |
| LLM08 | Vector and Embedding Weaknesses | Retrieval and knowledge bases |
| LLM09 | Misinformation | Not covered in depth |
| LLM10 | Unbounded Consumption | Not covered in depth |
Three items fall outside the scope of this tutorial. Do not skip them in a real review. Supply chain covers the models, datasets, and packages you depend on. Misinformation covers confident but wrong answers. Unbounded consumption covers attacks and bugs that drive up cost or exhaust capacity.
Running a review
Go through the list once per application, not once per company. For each item, record three things: whether it applies, which control addresses it, and who owns that control.
from dataclasses import dataclass
@dataclass
class Finding:
risk_id: str
applies: bool
control: str = ""
owner: str = ""
def gaps(findings: list[Finding]) -> list[str]:
"""Return IDs of applicable risks that lack a control or an owner."""
return [f.risk_id for f in findings
if f.applies and not (f.control and f.owner)]
review = [
Finding("LLM01", True, "Delimited prompts, output checks", "app team"),
Finding("LLM06", True, "Read-only tools, approval for refunds"),
Finding("LLM10", False),
]
print(gaps(review)) # ['LLM06']The check is deliberately simple. An applicable risk with no named control or owner is a gap, and the review should not close until each gap is resolved.
Reading the list well
- Treat LLM01, LLM05, and LLM06 as a chain. Injection gets text into the context, unsafe output handling lets that text reach a browser or interpreter, and excessive agency lets it trigger actions.
- Rank items by impact in your application. A read-only chatbot over public pages has a different profile from an agent that sends email.
- Do not treat a completed checklist as proof of safety. Earlier chapters showed that filters and prompt wording can fail, so the review should end with design changes that limit the damage of a successful injection.
Exercise
Your application is a support agent that reads customer emails and can issue refunds. Name two OWASP items that apply most directly and one control for each.
Show answer
LLM01 Prompt Injection applies because customer emails are untrusted input. A control is to delimit the email as data and test with canary payloads. LLM06 Excessive Agency applies because the agent can issue refunds. A control is to require human approval for refunds and give the agent only the tools it needs.