The Research Report
Prompt Injection as the Top Agent-Pipeline Risk (OWASP LLM01)
date: 2026-11-08
title: "Prompt Injection as the Top Agent-Pipeline Risk (OWASP LLM01)"
author: Brian Taylor
Prompt Injection as the Top Agent-Pipeline Risk (OWASP LLM01)
Prompt injection is the OWASP LLM01 risk: untrusted text ingested by the model causes it to follow attacker instructions instead of the developer's. For agent pipelines (trend-scout ingestion, email archiving, Drive sync, feed writing) the danger is not just a bad reply, but an injected instruction reaching a turn that can call tools.
Why agents are the higher-stakes case
In a chatbot, a successful injection is usually a bad answer. In an agent, the same turn often has tool access (read/write files, email, HTTP). Two forms matter:
- Direct injection arrives in the user/system-adjacent input channel.
- Indirect injection is planted in content the pipeline later retrieves: fetched pages, email bodies, synced docs, transcripts. EchoLeak (CVE-2025-32711) is the caution: a crafted email processed by M365 Copilot exfiltrated data with zero user interaction because the model treated retrieved email text as instructive.
The model cannot reliably distinguish an instruction meant for it from text merely describing one. Treat retrieved text as an untrusted data channel, not a sanitisation problem: OWASP notes no single filter solves prompt injection because the attack shares the channel with legitimate input.
High-impact failure modes for Brian's pipelines
- Trend-scout retrieval ingestion: hidden page text shapes summariser output and article facts.
- Email archive assistant: queued messages summarised for action items; injected instruction adopted as action.
- Drive-synced notes: stale poisoning recurs each run and is re-ingested.
- Tool-channel escalation: injected phrases bias tool arguments (paths, recipients, queries) and succeed against real systems.
Mitigations that actually hold (in priority order)
- Provenance tagging + instruction/data separation: label each context block with source and trust level; put untrusted content in a clearly delimited data section, never in the instruction chain; don't interpolate retrieved text into the system prompt.
- Least-privilege tooling applied to the turn: scope callable tools to the task; destructive actions (delete, send, publish) require explicit confirmation. A poisoned turn with only read tools exfiltrates at most in-scope data.
- Human in the loop for privileged outputs: summarise/draft, then require approval before send/publish.
- Validate model output at every sink: treat model text as untrusted input downstream (HTML escaping, parameterised queries, path canonicalisation, recipient allow-lists). Constrained decoding constrains syntax, not semantics, so a separate validation layer is still required.
- Secrets out of prompts: system prompts leak. Never put credentials, API keys, internal URLs or access decisions in the system prompt; enforce authorisation in code. Assume extraction.
- Sanitise retrieved content (low efficacy, cheap): strip hidden CSS/zero-width/HTML comments; use as defence-in-depth only.
- Tenant/partition isolation in RAG: enforce ACLs in the retriever, not in the prompt.
- Adversarial testing: feed crafted injection payloads through every untrusted path; check whether they override policy or trigger tool calls.
Concrete audit recipe for the home pipelines
- List every untrusted input flowing into prompts (fetched HTML, email text, Drive notes, transcripts, imported JSON). For each, identify which system prompt and tool surface live in that turn.
- For each tool, ask: would a coerced single call cause real damage? If yes, downgrade to confirmation-required or remove.
- Default ingestion turns to read-only; defer any write/publish to a separate verified stage.
- Allow-list outbound recipients/paths for send/publish tools.
- On detection: log offending snippet plus model tool calls; treat recurrence of the same payload as a service-gap candidate for the normal patrol.
What this does NOT fix
Prompt injection isn't believed fully preventable because model instruction and data channels are both text. The mitigations reduce blast radius and make coercion require multiple independent failures; they don't make a retrieved document trustworthy. Realistic goal: a single injected string cannot become an external write without a human noticing.