arXiv(opens in a new tab)cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.27496

ROPE: Routed Origin Policy Enforcement against Indirect Prompt Injection

Xinhang Ma, Chaowei Xiao, William Yeoh, Ning Zhang, Yevgeniy Vorobeychik

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Indirect prompt injection (IPI) plants instructions in the content a tool-using LLM agent reads, steering the agent into harmful tool calls. The strongest defenses are system-level, leveraging techniques such as task-conditional tool screening to prevent execution of malicious tools, and information-flow control to avoid tool execution with untrusted parameters. However, as agents grow more capable, users delegate more to automation. Consequently, tool execution sequences and parameter values are increasingly determined at runtime and cannot be reliably screened using information contained solely in the user query without significant utility loss. We present ROPE (Routed Origin Policy Enforcement), which is anchored in a structural notion of trust: a value may reach a state-changing tool only if it traces unforgeably to the user, a source the user explicitly named, or the user's own authoritative records. Enforcement is then a deterministic origin check over an audited set of sensitive tool parameters, and the only reliance on a language model involves solely the trusted user request, out of the attacker's reach. Our approach admits two provable guarantees: 1) at every step of a trajectory, no value whose only origin is attacker-writable content reaches an origin-guarded parameter, and 2) no rewording of an injection changes an admission decision. Through extensive experimental evaluation, we show that across four agent models on open-ended agent suites, ROPE holds attack success rate to 1.6–2.6% while retaining 82–100% of undefended clean utility, significantly exceeding state-of-the-art system-level defenses in utility while attaining comparable or better security on complex dynamic workflows. Further, we show that optimizing the injection against ROPE is largely ineffective, while long-horizon attacks that defeat prior system-level defenses achieve zero success rate in our case. Our code and logs are available at https://github.com/xhOwenMa/ROPE.

1 Introduction

Tool-using LLM agents are now taking consequential actions on a user's behalf: they send emails, move money, edit files, and manage accounts. To do so they read outside content, which exposes them to indirect prompt injection (IPI), where an attacker plants instructions in that content, hoping the agent follows them as commands [11]. Such harm lands when an attacker-chosen value reaches a state-changing tool, one that alters the world outside the agent (sending, paying, deleting), rather than a read-only tool that only returns information. It takes one of two forms: the injection induces a state-changing action the user never asked for, or it corrupts an action the user did want executed. Both forms share the consequence that a value the attacker wrote is passed to a tool that produces a malicious effect (e.g., deleting an important file).

Concern about IPI attacks has stimulated an active literature on defense [5, 13, 26, 30, 34]. The strongest of these today are system-level. There are two broad classes into which most system-level defenses fall. The first constrains which tools can be executed by an agent, typically, based on a user's task description. For example, DRIFT infers an expected trajectory and judges each action against it [18], while Progent generates an allow/deny policy over tool calls [29]. The security of a task then rests with the defense's ability to reliably determine, from the user request alone, what the agent should do.

The second class of system-level defenses monitors and constrains information flow. For example, CaMeL compiles the request into a program whose capabilities record each value's source [8]; label- and capability-based systems tag every value with a trust label as it enters the agent, propagate the labels through the computation, and refuse to let an untrusted value reach an operation designated sensitive ahead of time, either blocking the call or deferring it to the user [6, 17, 35, 36, 41]. We share this family's central idea of protecting information flows by evaluating whether a value came from a trusted origin. However, past approaches answer it with a single fixed rule for every task: anything read at runtime is untrusted, no matter what the user asked the agent to do. This approach is extremely conservative, giving up every task whose legitimate value must come from outside content—and, thus, giving up on most tasks requiring dynamic information for execution. To recover some of this lost

Figure

Figure 1: The utility–security tradeoff in AgentDyn (GPT-4o-mini agent; each point is a defense's overall clean utility and attack success rate, Tables 11 and 12). Every prior defense either preserves utility at high ASR (upper right) or crushes ASR by giving up the tasks (lower left); ROPE is alone in the favorable region, and the ordering is unchanged for all four agent models we evaluate (Figure 5, appendix).

utility, newer information flow defenses put a language model back in the loop to judge which flows to allow [10, 41]. However, since the LLM judge now reads the potentially injected content, it becomes a weak link in the defense.

The fundamental limitation of both kinds of system-level defenses comes down to delegation. Agents are useful because their strong LLM-powered “brain” spares the user from spelling out every step. However, the more a request leaves to content read at runtime, the less any artifact fixed before that content arrives, be it a predicted plan, an allow/deny policy, or a static trust boundary, can say about which of the coming values and actions are legitimate. The defense thus faces a dilemma: either block the content-driven steps it did not anticipate, or admit untrusted content, exposing the agent to attack. The first option costs utility, the second security. The cost is visible at scale: on the AgentDyn benchmark [20], which generates open-ended tasks that require runtime replanning, the strongest system-level defenses yield only a small fraction of an undefended GPT-4o-mini agent's task completion rate (see Figure 1), for example, 18.3% in the case of DRIFT and 6.7% for Progent, compared with 46.7% clean utility without defense. The information-flow defenses, such as PFI at 15.0%, do no better.

Is this, then, an unavoidable tradeoff, so that to gain security one must give up a substantial portion of utility? We argue that it is not, but to avoid this brutal tradeoff, it is necessary to take advantage of additional structural trust anchors that exist in the system. In particular, the following general principle can enable considerably more dynamic and adaptive defense against IPI that takes better advantage of available information: a value reaching a state-changing tool is trustworthy only if it carries an unforgeable trace back to the user or to a

party the user explicitly named. In other words, since in the IPI threat model we already trust the user, we can extend this trust to information flows that trace their origins to this trust anchor. Three origins meet this requirement: the user's actual request; a value delivered under an unforgeable runtime identity the user's request references, such as an email's sender with a verifiable signature; and the user's own authoritative records, which the platform, not the attacker, maintains. None requires a model to plan the task; each is a structural property tracing where a value came from.

We operationalize this in the proposed ROPE (Routed Origin Policy Enforcement) defense. As in the prior information-flow defenses, which tools can cause harm, and which of their parameters carry it, follows from the tool schemas and is pre-computed once offline as a small auditable set. The key change, however, is how we verify information flow integrity. While state-of-the-art defenses do so using a language model to preserve utility, our enforcement is a deterministic check that each such parameter's value has a trusted origin. Concretely, we design an origin tracker that labels each tool result by its structural origin. Then, ROPE allows a sensitive tool call only if its values match those with an origin this task accepts (§3.3). There is no language model in the loop to judge the plan, and, consequently, no LLM attack surface to target, and the agent is never penalized for a benign deviation such as an extra read or a reordered step so it keeps the autonomy that makes it useful, whereas prior system-level defenses hold it to a plan or boundary computed before the task unfolds.

This much of the defense is the same for every task: which parameters are checked, and that the check is a deterministic origin test. The origins a parameter may draw on, however, are not fixed across tasks. Setting them needs task-specific information (if any) that the user specifies as part of the request. A fully specified request names the value, so only the request needs to be trusted; an open request references a source, and that named source can be trusted too. In our architecture, a router reads the request, and only the request, and uses the information contained within it to determine the enforcement policy for each sensitive parameter for that task. Because its sole input is trusted, an injection cannot steer it; and because every sensitive parameter carries an audited default trusted origin, a deployment can read that default as a floor no router may relax, bounding what any router can give away (§4.6). The utility gain of ROPE thus comes from a) its ability to track trusted information in the tool calling semantics, and b) the recognition that incoming information can have different levels of trustworthiness that are grounded using traditional security mechanisms, so instead of relying on a fixed policy, ROPE is able to extend trust structurally based on exactly how much the user delegates. Our key insight is that by grounding trustworthiness of information in conventional security, it is possible to protect agent state-changing operations while maintaining high utility.

In summary, we make the following contributions:

  • We identify a failure mode shared by both families of system-level IPI defenses: whether the constraint is a plan or policy predicted from the request, or a trust boundary fixed across tasks, it is settled before the delegated content arrives, resulting in significant over-defense when the request delegates more to runtime content, which we connect to the utility collapse on open-ended benchmarks (§1, §4).

  • We give a deterministic definition of trust for tool parameter values, based on the platform's existing security mechanisms, and present ROPE, a defense that enforces it with no language model in the enforcement loop and no plan conformance checks (§2, §3).

  • We present two provable guarantees for ROPE (under mild conditions): 1) it soundly maintains trusted origin for tool parameter values at every step of the planning trajectory, and 2) its admission decisions are invariant to paraphrasing of the injection (§3.4).

  • We introduce under-specification as the signal that conditions enforcement strictness, produced by a router confined to the trusted request, and show it recovers the utility a fixed origin policy loses (§3, §4).

  • We comprehensively evaluate our approach in comparison with eleven state-of-the-art IPI defense baselines on four agent models and six benchmark suites, including an adaptive attacker optimizing against the live defense and a long-horizon staged attack. Our evaluation shows that ROPE is the only defense that achieves low ASR while preserving a high level of utility across all of these environments (§4).

References (39)