An LLM receives the system prompt, the user request, and any retrieved text as one sequence of tokens. Role labels such as "system" and "user" are treated as soft hints by the model, not as hard boundaries enforced by the runtime, which is why the same string can act as data in one context and instruction in another. This is the root cause described in the OWASP LLM01 entry, which notes that prompt injection exists because models do not segregate instructions from external data.
The indirect form is the one that matters when you pipe a retrieved web page, a PDF, a support ticket, or a tool response into a summarizer. OWASP's 2024 LLM01 page gives the canonical example: an attacker embeds instructions in a webpage, a user asks the LLM to summarize it, and the model follows the embedded instructions instead. The payload does not need to be visible to the user, only readable by the model.
Two model behaviors make this worse. The ACM tutorial on direct and indirect injection names them: instruction-following bias, where the model over-weights imperative phrasing and nearby task framing, and trust-boundary collapse, where the model cannot reliably track which text came from which origin once content is concatenated. A retrieved page full of "Do X now" sentences sits directly in that failure zone.
So the question is not whether you can stop a determined attacker with a prompt. The evidence, including a large adaptive-attacker evaluation that tested nine defense configurations across more than 20,000 attacks, is that every defense that relied on the model to protect itself eventually broke. Fencing is a cheap, deterministic layer that raises the cost of a simple injection and makes attacks easier to see. It belongs in a stack, not on its own.



