Can capability tracking stop prompt injection attacks?
Can tracking data and control flow through a custom interpreter enforce security policies strong enough to block prompt injection? This matters because LLMs used by agents need defenses that work regardless of the model's training.
CaMeL's authors propose "a robust defense that creates a protective system layer around the LLM, securing it even when underlying models are susceptible to attacks." Rather than training or prompting the model to resist malicious instructions, CaMeL "explicitly extracts the control and data flows from the (trusted) query; therefore, the untrusted data retrieved by the LLM can never impact the program flow." On the AgentDojo benchmark the paper reports solving "77% of tasks with provable security (compared to 84% with an undefended system)" — a roughly seven-point drop in tasks completed, traded for a guarantee that no policy violation occurs on the tasks it does solve.
The mechanism borrows directly from software security: "Control Flow Integrity (Abadi et al., 2009), Access Control (Anderson, 2010, Chap. 6), and Information Flow Control (Denning and Denning, 1977)." A Privileged LLM (in Simon Willison's 2023 terms) turns the user's trusted query into pseudo-Python code — the plan. A custom interpreter then executes that plan while maintaining "a data flow graph (i.e., tracking which values each variable depends on)" and attaching a "capability" to every value: metadata recording where it came from and what it is allowed to touch. When the plan calls a tool, the interpreter checks the capability of each argument against a security policy before the call is allowed to execute — so a value sourced from an untrusted document can be blocked from flowing into, say, an email-recipient argument, regardless of what text that document contains.
Against Why do single-message classifiers miss cross-agent harms?, CaMeL is the same reframing — "better understood as a... flow problem than as a... classification task" — made concrete and enforced. SafeFlow's semantic taint is tracked but, by that note's own account, not fully specified; CaMeL specifies the mechanism: capabilities as first-class metadata, checked by an interpreter at the moment of tool invocation rather than inferred from re-expressed natural language. It also differs from Can inspecting generated workflows catch planning-time attacks?, which argues the right intervention point is the planning boundary, upstream of where organization is committed. CaMeL does not rely on a single upstream check: it secures the control flow once, at planning time, but then continues enforcing policy at every single tool call downstream, treating each step as a fresh point where a mislabeled value could otherwise slip through.
The excerpt does not establish how much utility the guarantee costs outside AgentDojo, or how often legitimate tasks get blocked by an over-cautious policy — the paper's own discussion names "user fatigue" from declassification prompts as an open tradeoff, not a solved one. CaMeL also explicitly does not defend "text-to-text attacks which have no consequences on the data flow," such as an injected summary that distorts content without exfiltrating anything, or phishing text shown to the user. The implication is that capability tracking closes the data/control-flow channel specifically, not prompt injection as a category; a complete defense still needs something else for attacks that work entirely inside the words the model produces.
Inquiring lines that read this note 3
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?Related concepts in this collection 4
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
-
Why do single-message classifiers miss cross-agent harms?
Can prompt classifiers detect malicious intent when harm emerges only across multiple agent interactions? The question reframes security from checking individual messages to tracking how content flows and transforms through a multi-agent system.
same reframing from classification to flow, which CaMeL implements as a concrete, checked mechanism rather than a semantic taint
-
Can inspecting generated workflows catch planning-time attacks?
Does examining a workflow after it's created catch attacks that corrupt the planning signals upstream? This matters because if contamination enters earlier, downstream inspection might miss malicious intent laundered into legitimate-looking structure.
contrasts on where enforcement sits: one upstream planning boundary versus a capability check repeated at every downstream tool call
-
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?
CaMeL's per-call capability check is the kind of hop-level enforcement this note says input-boundary filters lack
-
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?
the gap in the predecessor pattern that CaMeL's capability tracking is built to close
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Defeating Prompt Injections by Design
- Design Patterns for Securing LLM Agents against Prompt Injections
- Progent: Securing AI Agents with Privilege Control
- Securing Agentic AI: From Per-Action Checks to Trajectory Assurance
- FLOWSTEER: Prompt-Only Workflow Steering Exposes Planning-Time Vulnerabilities in Multi-Agent LLM Systems
- Your Agent, Their Asset: A Real-World Safety Analysis of OpenClaw
- EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents
- ChannelGuard: Safe Models Do Not Compose into Safe Multi-Agent Systems
Original note title
CaMeL defeats prompt injection by enforcing capability policies on tracked control and data flow — solving 77 percent of AgentDojo with provable security