← WRITING INDEX
AI Red Teaming · Jul 20, 2026

Interactive Lab: Indirect Prompt Injection

Change the retrieved document and compare an over-trusting agent with one protected by an external policy gate.

#interactive#prompt-injection#rag#authorization

An indirect prompt injection enters an AI system through content the user did not write directly: a document, webpage, email, tool result, or memory entry. The security question is not only whether the model follows it. The important question is what authority the resulting action receives.

INTERACTIVE / 001

Indirect prompt injection simulator

LOCAL · NO API
03 / EXECUTION MODE
USER→RETRIEVAL→MODEL→POLICY / TOOL
  1. Ready. No execution started.
RESULT / WAITING

Choose a mode and run the simulation.

This is a deterministic teaching model, not a live LLM. It demonstrates where authorization changes system impact.

What the demo simplifies

The simulator uses a deterministic keyword check rather than a language model. Real attacks can be obfuscated, multilingual, split across documents, or expressed without obvious keywords. A classifier or prompt filter is therefore not a complete policy boundary.

The architectural lesson

The unsafe mode lets a model decision flow directly into a privileged tool. The gated mode lets the model propose an action, but checks authorization outside the model before execution.

This does not eliminate prompt injection. It reduces the impact an injection can produce.