Zenaique

Match each OWASP LLM Top 10 risk to the control that addresses it

Match pairs·Medium·4.0 · 0·~2 min·Asked atForethoughtLambda LabsStripe
Attempt it

Drag each answer to line up with its matching prompt

LLM01 prompt injection

Output schema validation and parameterised calls to downstream systems

LLM02 insecure output handling

Tool allowlist, argument validation, human confirmation on irreversible actions

LLM06 sensitive information disclosure

Input rail with injection classifier plus quarantined processor pattern

LLM08 excessive agency

PII redaction on input and output, prompt cache scrubbing

LLM09 overreliance

Citation required output rails and confidence display in the UI

LLM10 model theft

Rate limiting, query throttling, and watermarking on hosted endpoints

TL;DR

Six OWASP LLM risks pair with six canonical controls, input rail+dual-LLM for LLM01, output schema validation for LLM02, PII redaction for LLM06, tool gating for LLM08, citations and confidence UI for LLM09, rate

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Think of a list of common kitchen accidents and the right safety device for each. Cut yourself when chopping? Use a sharp knife and a guard. Burn yourself on a hot pan? Oven mitts. Poison the dish because the chef trusted a spoiled ingredient? Smell and taste check before serving. Eat raw eggs and get sick? Cook properly. Someone steals your secret recipe? Lock the recipe book. Each accident has a matching safety device that targets that specific risk; mixing them up means using oven mitts to prevent food poisoning. The OWASP LLM Top 10 works the same way: ten common threats, each paired with the canonical control that addresses it directly.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The OWASP Top 10 for Large Language Model Applications is the industry-standard threat taxonomy for LLM security. Treating it as a checklist where each item has a canonical control is the basis of any disciplined safety review. The common failure mode is to deploy one classifier, say, an input safety filter, and assume it addresses multiple items. It does not. Each item has its own structural defence at its own layer.

This walkthrough covers the six items in the question, LLM01, LLM02, LLM06, LLM08, LLM09, LLM10, with the canonical control for each, the architectural reason that control is the right answer, and how the controls compose with rail-based frameworks like NeMo Guardrails.

Mental model: the OWASP Top 10 is a threat-model catalogue. The matching controls are the defence in depth playbook. One item, one canonical control; production stacks deploy all of them.

LLM01 prompt injection and LLM02 insecure output handling

LLM01: where the injection comes from

Direct injection arrives in the user message. Indirect injection arrives in retrieved content (documents, webpages, emails, tool outputs). They share a name because the underlying mechanism, adversarial text that hijacks the model's behaviour, is the same, but the attack surface is different.

LLM01 control: layered defence

The canonical control combines two layers:

  • Input rail (Llama Prompt Guard, Lakera Guard, Microsoft Prompt Shields). Catches the obvious direct-injection patterns at the edge. Cheap, fast, runs on every request.
  • Retrieval rail (strip instruction tokens from documents, drop unauthorised retrievals) plus dual-LLM / quarantined processor pattern (the tool-calling model never reads untrusted content directly). Closes the indirect-injection gap that filtering alone cannot cover.

A team that deploys only one of these is exposed on the other vector. Both are mandatory for agentic stacks that touch external content.

LLM02: the downstream trust problem

LLM02 is misunderstood as 'unsafe content in the response'. It is not. LLM02 is about what downstream code does with the model's output. If the response is concatenated into a SQL query, executed as shell, parsed as JSON without validation, rendered as raw HTML, or fed into another API as a parameter, the model has become a code-execution channel.

LLM02 control: treat the model as untrusted

The canonical control is to apply the same security hygiene you would to any user-supplied input:

  • Validate output against a strict schema (Zod, Pydantic, JSON Schema with additionalProperties: false).
  • Use parameterised queries for any database call constructed from model output.
  • Escape for the target sink (HTML encode, SQL escape, shell quote).
  • Never eval model output and never let it directly drive system-level actions without an intermediate validated representation.

This is downstream-code hygiene more than LLM-specific safety. A team that ships an LLM product without this discipline is one prompt-injection away from a full SQL-injection-class incident.

LLM06 sensitive information disclosure and LLM08 excessive agency
LLM09 overreliance and LLM10 model theft
Composition with NeMo's five-rail decomposition and operational priority
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • OWASP GenAI Security Project publishes the LLM Top 10 with concrete control recommendations and updates it yearly.
  • AWS Bedrock Guardrails maps its controls explicitly to OWASP Top 10 categories in its 2026 documentation.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow does the OWASP Top 10 map onto NeMo Guardrails' five rail types?
A

LLM01 (direct) → input rail; LLM01 (indirect) → retrieval rail; LLM02 → output rail with schema validation plus downstream code hygiene; LLM06 → input and output rails plus prompt-cache isolation; LLM08 → execution rail with allowlist and confirmation; LLM09 → output rail plus product UX. The rail decomposition gives an architectural surface for each item.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Picking a generic control (an input filter) and assuming it addresses multiple OWASP items. Each item has a specific defence; using one control for all collapses the defence in depth model.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • The six OWASP items in the matching question and their canonical controls

  • Why LLM01 needs both input rail and dual-LLM

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Pick the strongest reason…
MCQ·Medium