Indirect Prompt Injection › Why indirect injection is structurally different

Michael BrenndoerferDecember 2, 20264 min read
Language AI HandbookAll chapters
Part 61 of 67Agentic AI and Protocol Security
Chapter 466Indirect Prompt Injection › Why indirect injection is structurally different
Reading section 2 of 14 · Why indirect injection is structurally different · 4 minSection 2 of 14 · 4 min

Section 2 of 14 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Prompt injection is a failure in which model input is interpreted as an instruction that changes application behavior outside the intended task. When the input reaches the model through material the application obtains on the user's behalf, it is commonly called indirect prompt injection. Examples of inbound data sources include retrieved reference material and tool results. Their source can be known and authenticated while their contents retain a data-only role. The UK's National Cyber Security Centre distinguishes this situation from controls that enforce a strict separation inside a conventional interpreter. NCSC prompt-injection analysis

A label that says “retrieved evidence” communicates the intended role of the data to the model. The application needs its own decisions about access and the next operation. Structured output limits what a downstream parser can accept. A schema-valid proposal can still be outside the caller's authority, so validate authorization separately in application code. OWASP Gen AI Security Project guidance

This distinction matters in a read-only assistant. An answer can be misleading even when the model has no write capability. A request for access can also be denied while a task succeeds with the remaining visible evidence. We will keep the example focused on those two outcomes: the usefulness of the returned evidence and the authority to retrieve or display it.

Which claim does a provenance label support?

Suppose a library maintains a collection of staff-approved policies. The ingestion record can say which edition a policy came from and whether it was in the reviewed collection. That is a provenance claim. It helps a maintainer decide what document to cite or replace when a newer edition appears. Neither the edition nor the review label states which software operations the answer model may request. A signed or otherwise authenticated source can be legitimate evidence and still contain ordinary instructions for its intended human audience.

This matters for how we design reviewer screens. A reviewer who sees Verified next to a document needs to know what was verified. It might refer to the document's identity, a checksum, a source system's authentication, or a human decision that the text matches a topic. The application needs to represent those judgments separately. If the reviewer chooses whether a location answer is sufficiently supported, a source identifier and version can be useful. The reviewer does not thereby grant the answer model new capabilities. The service's permission comes from the application policy.

A simple design exercise is to trace a document's origin through three representations. First there is the stored record in the catalog. Next there is the limited set of values selected for the model. Finally there is a proposal for what to show to the user. Where can a maintainer verify each representation's role? At retrieval the maintainer can verify which record and fields were read. At assembly the maintainer can check which fields were selected. At rendering the maintainer can verify the audience and assess how the proposal was accepted. Treat those as three different observations, even if one event store eventually records them.

Structured boundaries are useful chiefly when code enforces their semantics. A source wrapper can retain origin and mark fields through a pipeline. A receiving function can use the origin for logging or to select a view. A serializer can put a data record into a clearly named field. In each case the outside control depends on actual input types and routes. If the wrapper has a free-text field, a model may still process that field as language. Pair the wrapper with a separate enforcement point that understands which operations are legal for the request.

There is also a difference between factual relevance and authorization. Finding a guide that seems relevant to the user's location question cannot prove that the reader may see a particular copy. Permission may depend on which language or edition is available for the reader's collection. Use retrieval relevance to rank records that can participate under policy. State where authorization applies if resources are collected from multiple libraries. A design calling itself read-only still needs to check read rights for the requested resource and response audience.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy