Imagine you’ve hired a personal assistant. You tell them, "Send the Q3 summary to my manager." A helpful assistant looks up your manager in the company directory and hits send. But what if the assistant gets confused by an old email thread and sends it to the legal team instead? Or worse, what if a malicious document they just read "suggests" they should send it to [email protected]?
Current security for Large Language Model (LLM) agents mostly focuses on the second scenario—blocking data from untrusted sources. But as this paper points out, even "trusted" data can lead to unauthorized actions.
TL;DR
INTENTFLOW is a security mediation layer that prevents LLM agents from making tool calls that deviate from a user's actual intent. By checking tool arguments against both their origin (provenance) and a formal intent contract, it blocks "trusted-but-unauthorized" actions that traditional defenses miss.
What Problem Does This Paper Address?
LLM agents are powerful because they can use tools: sending emails, querying databases, or scheduling meetings. However, they are susceptible to Indirect Prompt Injection, where malicious content in a retrieved document tricks the agent into doing something harmful.
Existing defenses usually rely on provenance—tracking where a piece of data came from. If the agent tries to send an email to an address found in a random web page, the system blocks it because the source is untrusted.
The authors identify a critical gap: Trusted-but-Unauthorized (T-b-U) arguments. This happens when the agent picks a value from a trusted source (like a company directory) that the user never actually authorized for that specific task. If you ask to email your manager, and the agent emails the CEO because they are both in the "trusted" directory, a provenance-only check will happily let it slide. INTENTFLOW is designed to close this "honest mistake" (or subtle subversion) loophole.
Methods
The authors introduce INTENTFLOW, a stateless mediator that sits between an unmodified LLM planner and the tools it wants to execute.
Key components include:
- Intent Extraction: When a user makes a request, a small, fast LLM (like GPT-4o-mini) generates an Intent Contract. This is a JSON object listing exactly what the user authorized: the action, the expected recipients, file paths, etc.
- Argument Roles: Not all arguments are created equal. INTENTFLOW distinguishes between authority-bearing arguments (like an email recipient or a file path) and content/payload arguments (like the body of the email). Authority-bearing arguments get much stricter scrutiny.
- The Mediation Algorithm: For every tool call, INTENTFLOW checks:
- Provenance: Is the data source allowed for this role?
- Intent: Does this value match what was authorized in the Intent Contract?
- Hardening: The system includes a registry for resolving aliases (e.g., mapping "my manager" to a specific email) and SQL syntax checks to prevent database injection.
Datasets
The researchers evaluated INTENTFLOW across several suites (summarized in Figure 3):
- Bench-v2 (main): A synthetic benchmark of 450 tasks (200 attacked, 250 benign) testing standard injections.
- Disambiguation-v2: A new set of 100 tasks specifically designed to test T-b-U scenarios where the "wrong" value comes from a trusted internal source.
- AgentDojo-derived: A replay of tasks from a popular existing agent benchmark.
- Adaptive White-box: Attacks designed by an adversary who knows exactly how INTENTFLOW works.
- Live Planner Campaign: 160 tasks using a real, live LLM planner to see how it performs in the wild.
Key Insights and Ideas
- Provenance is necessary but insufficient. Knowing where data came from doesn't tell you if it's the right data for the job.
- The "Authority" Distinction: You don't need to be a hawk about the text inside an email (the payload), but you must be absolute about who receives it (the authority). This allows for flexibility in generation while maintaining safety.
- Fail-Closed by Default: In its "Hardened" configuration, if INTENTFLOW can't resolve an endpoint or if an argument doesn't match the intent contract, it blocks the call. This is a classic security principle applied to the fuzzy world of LLMs.
- Human-in-the-Loop: The system can be configured to ask for a human "Confirm" instead of a hard "Block" when things are ambiguous, preserving utility without sacrificing security.
Key Results
The results show a dramatic improvement in security without breaking the agent's usefulness:
- Attack Success Rate (ASR): On the main benchmark, ASR dropped from 50.5% with provenance alone to just 12.0% with INTENTFLOW.
- T-b-U Protection: In the Disambiguation-v2 set, provenance-only mediation failed to block any of the 50 attacks. INTENTFLOW blocked all 50.
- Utility (BTSR): INTENTFLOW maintained a 100% Benign Task Success Rate on the main benchmark, meaning it didn't get in the way of legitimate requests.
- Live Performance: In the live planner campaign, the mediator blocked all 17 corrupted calls proposed by the LLM across 110 attacks.
Limitations and Future Work
The authors are transparent about several hurdles:
- Intent Extraction Errors: If the initial "Intent Extractor" gets the user's request wrong, the whole system fails.
- Manual Curation: The alias and endpoint registries currently require manual setup, which doesn't scale perfectly.
- Phishing Risk: While INTENTFLOW ensures an email goes to the right person, it doesn't currently inspect the content for phishing attempts or social engineering.
- Role Confusion: Clever attackers might still find ways to hide instructions inside "content" fields that the system treats more leniently.
Future work aims to automate role inference and add "semantic provenance" to better inspect the actual content being sent.
Summary updated