This course walks you through the OWASP Top 10 for LLM Applications (2025), one risk at a time. In each module you attack a small, deliberately vulnerable LLM app in your browser, apply the code-level fix, flip a Vulnerable/Secure toggle, and prove the fix holds. It is the companion to our OWASP Top 10:2025 web course: if you have not done that one, start there.
Who this is for
Developers, security engineers, pentesters and students who can use a terminal and a browser’s dev tools. You do not need any machine-learning background.
What you’ll be able to do
- Draw the architecture of an LLM app and mark the trust boundaries: where untrusted text enters, and where model output goes.
- Exploit each of the ten risks in a small local app, in the browser first.
- Apply the code-level fix for each risk, flip the toggle, and prove it with a re-test (and prove normal use still works).
- Say what to log and alert on, and what the alert looks like in the audit log.
- Use a cheat sheet in a design review: which of the ten risks applies to this feature, and which control covers it?
The thread through all ten modules: the model is an untrusted component that follows text. Most fixes are not "a better prompt" but ordinary engineering around the model: authorization in code, least privilege, output encoding, quotas, provenance and logging.
Prerequisites
- A terminal and a browser with dev tools.
- Docker with Compose v2, or Python 3 for the no-Docker mode. Tested versions are stated in each lab’s README.
- No API key, no cloud account and no paid service.
How the labs work
Each module has one small, realistic app and one downloadable lab zip. The lab opens in your browser at http://127.0.0.1:83NN, where NN is the module number.
- UI first. Missions, hints, a success banner with a flag, and a checklist. The curl/script version is kept as "Option 2: from the terminal".
- Vulnerable / Secure toggle. Turn the fixes on and re-run the same attack. A "What changed?" view shows the code difference.
- X-ray panel. See the exact prompt the model received, the tool calls, what the attacker got, and the audit log.
- Built-in simulated model. Labs use a deterministic simulated model, so there is no API key and no cost, and you get the same output on every run. Real models are probabilistic, and each module says plainly what the simulation proves and what it does not. Switching to a local model through Ollama is an optional extra.
- One command to start.
./run.sh(Docker Compose),./run.sh localfor plain Python 3, or.\run.ps1on Windows.
Using the labs safely
- Everything listens on
127.0.0.1only and uses fake data and placeholder names. - The labs are intentionally vulnerable and for education only. Never point these techniques at systems you do not own or have written permission to test.
- Do not expose a lab port to a network. Stop and clean up when you finish:
docker compose down --rmi all.
The module list
Modules (10)
-
Module 1: Prompt Injection (OWASP LLM01:2025)
Hijack a tool-using assistant with direct and indirect injection, then prove which code-level fix stops which attack.
-
Module 2: Sensitive Information Disclosure (OWASP LLM02:2025)
Make a support bot leak another customer's record and its own internals, then close each leak with code-level fixes.
-
Module 3: Supply Chain (OWASP LLM03:2025)
Load a look-alike pickle model and a moved reference, then lock the chain with safe loading, pinning and publisher checks.
-
Module 4: Data and Model Poisoning (OWASP LLM04:2025)
Plant a backdoor through feedback, a dataset and a help article while accuracy stays at 100%, then stop it with provenance and limits.
-
Module 5: Improper Output Handling (OWASP LLM05:2025)
Watch model output reach HTML, SQL and a shell (simulated, nothing runs), then fix it with encoding, parameters and allow-lists.
-
Module 6: Excessive Agency (OWASP LLM06:2025)
An assistant e-mails and deletes files nobody asked it to; fix it with least-privilege tools, scoped permissions and human approval.
-
Module 7: System Prompt Leakage (OWASP LLM07:2025)
Extract a system prompt and reuse its leaked key and override code, then move secrets and authorization out of the prompt.
-
Module 8: Vector and Embedding Weaknesses (OWASP LLM08:2025)
Read another tenant's data, poison a RAG index and invert a stolen embedding, then fix it with filters and ingestion checks.
-
Module 9: Misinformation (OWASP LLM09:2025)
A bot invents a refund window, a package and a payout; fix it with grounding, abstention, verification and human review.
-
Module 10: Unbounded Consumption (OWASP LLM10:2025)
Flood an AI app with huge requests, endless loops and model copying, then stop it with caps, quotas, budgets and alerts.
Work through them in order: each module page follows the same shape (learn the risk, run the lab in Vulnerable mode, apply the fixes, flip to Secure and prove which fix stops which attack), and ends with a link to the next one. A one-page wrap-up cheat sheet is coming soon.
Want the deep dive on LLM01 now? Read Indirect Prompt Injection: Hijacking a Tool-Using AI Agent, which the LLM01 module builds on.
A note on the facts
Module order follows the official 2025 list on the OWASP GenAI Security Project. Real-world incidents are cited neutrally, with sources, and no disputed figures.