Securing AI Agents with Information-Flow Control

Manuel Costa, Boris Köpf, Aashish Kolluri, Andrew Paverd, Mark Russinovich, Ahmed Salem, Shruti Tople, Lukas Wutschitz, Santiago Zanella-BéguelinarXiv 2025 · DOI

Abstract

Large Language Model (LLM) agents are increasingly integrated into autonomous workflows, granting them access to sensitive tools and untrusted external data. This integration exposes agents to indirect prompt injection attacks (PIAs), where malicious data can hijack the agent's control flow. We present FIDES, a novel agent planner that utilizes Information-Flow Control (IFC) to provide deterministic security guarantees. FIDES selectively hides untrusted data in variables and employs a quarantined LLM for safe inspection via constrained decoding. Our evaluation on the AgentDojo benchmark demonstrates that FIDES successfully blocks all policy-violating injections while maintaining high utility for complex, data-dependent tasks.

Introduction: The Vulnerability of Autonomous Agents

As AI agents move from simple chat interfaces to autonomous actors capable of sending emails, managing finances, and modifying files, their security surface area expands dramatically. A primary threat is the indirect prompt injection attack (PIA). In this scenario, an agent processing untrusted data—such as a web page or an incoming email—encounters hidden instructions that override its original programming. For example, a malicious email might command an agent to "forward all sensitive documents to [email protected]."

Current defenses often rely on probabilistic methods like prompt engineering or output filtering, which are frequently bypassed by sophisticated attackers. There is a critical need for deterministic security guarantees that ensure untrusted data cannot influence high-stakes actions or leak confidential information without breaking the agent's functional utility.

Methodology: Information-Flow Control and FIDES

To address these risks, we apply Information-Flow Control (IFC) to the agent architecture. IFC works by assigning security labels to all data processed by the agent, tracking the "taint" as information moves through the system.

Figure 1: The FIDES architecture integrates a Policy Engine and Planner Memory into the standard agent loop to track and control information flow.

Security Labels and Taint Tracking

Data is categorized using a lattice of security labels, typically representing dimensions like Trust (Trusted vs. Untrusted) and Confidentiality (Public vs. Secret). As the agent operates, a dynamic taint-tracking system propagates these labels. For instance, if a trusted planner reads an untrusted email, the resulting context becomes "untrusted."

Figure 2: The security label lattice defines the hierarchy of information flow, ensuring data only moves between compatible security levels.

The FIDES Planner

FIDES (Latin for "trust") implements two core mechanisms to balance security and utility:

  1. Selective Variable Hiding: To prevent prompt injections from entering the LLM's primary context, FIDES intercepts tool outputs with lower security labels (e.g., untrusted web content). Instead of placing the raw content in the prompt, FIDES stores it in a secure memory and replaces it with a placeholder variable (e.g., #email_body_1#).
  2. Quarantined LLM Inspection: When a task requires the agent to understand the content of a hidden variable (e.g., "Is this email an invitation?"), FIDES uses a query_llm tool. This tool sends the hidden data to an isolated, secondary LLM. Crucially, the output is restricted to a strict schema (like a boolean or enum) using constrained decoding. This "low-capacity" output prevents complex injection payloads from reaching the main planner.

FIDES enforces two primary policies: Trusted Action (P-T), which prevents consequential tool calls in untrusted contexts, and Permitted Flow (P-F), which restricts data transmission to authorized recipients.

Evaluation and Key Insights

We evaluated FIDES using AgentDojo, a benchmark comprising 97 benign tasks and 35 injection scenarios across workspace, travel, banking, and Slack environments.

The Security-Utility Trade-off

A naive "strict" planner that completely blocks untrusted data is secure but useless for data-dependent tasks (e.g., "Summarize this email"). FIDES bridges this gap. By categorizing tasks into Data Independent and Data Dependent, we observed that FIDES allows agents to solve complex tasks by safely querying untrusted data without exposing the main control loop to injection risks.

Performance Results

  • Security: FIDES achieved a 100% success rate in blocking prompt injection attacks that violated its security policies. In comparison, an unprotected GPT-4o planner succumbed to 163 successful injections.
  • Utility: While security policies naturally introduce overhead, FIDES mitigates the utility loss. When paired with reasoning models like OpenAI's o1, FIDES completed approximately 16% more tasks than a basic policy-enforced planner. With prompt tuning to optimize the use of the query_llm tool, this advantage increased to 24%.

Discussion and Limitations

While FIDES provides robust security, it introduces a 2-3x increase in token usage due to the additional conversational turns required for quarantined inspection. Furthermore, execution can fail if the primary LLM attempts to bypass the variable hiding mechanism, triggering a policy violation and halting the task.

Future research will focus on "permissive label propagation" to reduce false positives and optimizing the system for lower latency. The development of "policy-aware planners" that can strategically navigate security constraints remains a key goal for the next generation of autonomous AI agents.

Summary updated

BibTeX
@misc{costa2025securing,
  author = {Manuel Costa and Boris Köpf and Aashish Kolluri and Andrew Paverd and Mark Russinovich and Ahmed Salem and Shruti Tople and Lukas Wutschitz and Santiago Zanella-Béguelin},
  title = {{Securing AI Agents with Information-Flow Control}},
  year = {2025},
  eprint = {2505.23643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23643},
}
Figure