Can structural design patterns block prompt injection attacks?
This research explores whether fixing an agent's control flow architecture—rather than training or filtering—can provide provable resistance to prompt injection. It matters because general-purpose defenses have failed to guarantee safety against adversarial inputs.
The paper argues that general-purpose LLM agents — ones meant to automate "a wide range of workflows" and given access to powerful tools such as code execution — cannot be given "meaningful and reliable safety guarantees" against prompt injection as long as both the agent and its defenses rely on the current class of language models. Its alternative is a set of design patterns for "application-specific agents" that trade some generality for "provable resistance" to prompt injection. The paper's own framing of the goal: "once an LLM agent has ingested untrusted input, it must be constrained so that it is impossible for that input to trigger any consequential actions."
The excerpt describes the first two of six patterns. In the Action-Selector pattern, the agent works like an LLM-modulated "switch" statement: it maps a natural-language request onto one of a small, predefined (optionally templated) set of actions, and — critically — no output from those actions ever feeds back into the agent, so injected content in a tool result has nothing to act on. In the Plan-Then-Execute pattern, feedback from tool outputs is allowed back to the agent, but the sequence of actions is fixed as a plan before execution begins, so tool outputs can influence what the agent later says but not which actions get taken. The paper sorts existing defenses into LLM-level (prompt engineering, adversarial training), user-level (human confirmation before sensitive actions), and system-level (external verification and control), and places its own patterns in the system-level category, arguing it is "one of the most promising paths toward robust safety guarantees" precisely because LLM- and user-level defenses "do not provide guarantees" or "pose a safety risk themselves with tired or overloaded human verifiers."
This sits against Do internal agent hops in pipelines need security monitoring?, which found that input-boundary filters see only the user's prompt and miss every inter-agent hop; this paper's patterns are aimed at exactly that gap, constraining the agent's control flow architecture-wide rather than filtering at a single entry point. It also bears on Can prompts alone reshape multi-agent workflows without system access?: the Plan-Then-Execute pattern is offered as a structural answer to that kind of planning-time reshaping, since the plan is fixed before tool outputs can touch it — though this excerpt does not test the pattern against that specific attack. And it contrasts with Why does prompt hardening work for single agents but not multi-agent systems?, an LLM-level, prompt-engineering defense of the kind this paper argues cannot "provide guarantees" regardless of how much it reduces exposure in practice.
The excerpt does not include the paper's empirical results: it mentions "ten case studies" and a claim of "provable" resistance, but the body given here stops at the taxonomy and the first two patterns, with no benchmark numbers, attack success rates, or utility-cost measurements attached to either pattern. The claim to take from this excerpt is therefore architectural rather than measured: these are constraints an agent's designer chooses at build time — which actions exist, whether tool output can reach the agent, whether the plan is fixed before execution — not a filter or detector that can be added on top of an already general-purpose agent after the fact.
Inquiring lines that read this note 8
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
How do prompt injection attacks compromise agent reasoning and security?- Why is prompt injection better understood as a flow problem?
- What defenses do text-to-text injection attacks still need?
- How does symbolic matching on tool names prevent prompt injection attacks?
- Can defenses that secure only control flow miss attacks on data values?
- Why does isolating the planner fail to stop value manipulation attacks?
- Can repeated prompt injection compete with attention-based mitigation approaches?
Related concepts in this collection 5
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Do internal agent hops in pipelines need security monitoring?
Multi-agent systems route data between planner, worker, verifier, and synthesizer components. Current defenses only guard user input at the entry point, leaving inter-agent channels unmonitored—but is this a real vulnerability or does downstream safety suffice?
this paper's patterns constrain control flow architecture-wide, addressing the inter-agent hops that input-boundary filters miss
-
Can prompts alone reshape multi-agent workflows without system access?
Explores whether attackers can compromise planner-executor multi-agent systems by manipulating the planning prompt itself, without touching agents, tools, or infrastructure. Matters because it identifies a previously overlooked attack surface that existing defenses don't address.
the Plan-Then-Execute pattern fixes the plan before execution, the structural answer to the planning-time reshaping this note demonstrates
-
Why does prompt hardening work for single agents but not multi-agent systems?
Prompt hardening reduced payload exposure by 40–75% in single-agent systems but failed entirely in multi-agent ones. The gap may reveal how task decomposition breaks the contextual awareness needed for defenses to activate.
contrasts prompt-level hardening, an LLM-level defense this paper says cannot provide guarantees, with its own structural patterns
-
Does isolating planning from untrusted data actually stop prompt injection?
Willison's Dual LLM pattern separates planning from untrusted content, but can attackers still manipulate the quarantined LLM to extract and misuse sensitive values from documents?
Evidence for A: shows weaker isolation (Dual LLM) still lets injected content redirect actions, motivating A's stricter control-flow-cutting patterns
-
Does multi-agent architecture make systems easier to attack?
When the same task runs on multiple agents instead of one, does the added complexity create new vulnerabilities? This matters because it would mean multi-agent design carries a built-in security cost.
Evidence for A: switching single- to multi-agent architecture alone raises injection success from 11% to 69%+6%, no pattern change
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Design Patterns for Securing LLM Agents against Prompt Injections
- FLOWSTEER: Prompt-Only Workflow Steering Exposes Planning-Time Vulnerabilities in Multi-Agent LLM Systems
- Defeating Prompt Injections by Design
- Corrupt Plans, Clean Traces: Evading Chain-of-Thought Monitoring with Plan Injection
- Progent: Securing AI Agents with Privilege Control
- LLMs Corrupt Your Documents When You Delegate
- Are Frontier LLMs Ready for Cybersecurity? Evidence for Vertical Foundation Models from Dual-Mode Vulnerability Benchmarks
- From Monoliths to Swarms: A Study of Attack Surface Evolution in the Transition to Multi-Agent Web Systems
Original note title
design patterns that cut the control-flow path from untrusted input to consequential actions give agents provable resistance to prompt injection