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

Manuscript Offprint

arXiv:2610.24277

SPIDES: Information-Flow Control for Browser Agents

Egor Zverev, Juhee Kim, Leon Trampert, Boris Köpf, Aashish Kolluri, Shruti Tople, Santiago Zanella-Béguelin

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

Egor Zverev ∗^{*} †^{\dagger}

ISTA

Juhee Kim ∗^{*}

Microsoft

Boris Köpf

Microsoft

Leon Trampert †^{\dagger}

CISPA Helmholtz Center for Information Security

Aashish Kolluri

Microsoft

Shruti Tople

Microsoft

Santiago Zanella-Béguelin

Microsoft

ABSTRACT

Browser agents automate complex workflows by reading and acting on arbitrary page content, but this flexibility exposes them to prompt injection attacks and unintended data exfiltration. Recent work argues that LLM-driven browser agents erode traditional web security boundaries such as the Same-Origin Policy (SOP) by acting across origins with the user's authority and no built-in isolation. We argue that restoring SOP is neither sufficient (a same-origin public sink can leak private data) nor necessary (legitimate tasks require authorized cross-origin flows) for protecting the security of users. We propose SPIDES, which instead enforces information-flow control by gating primitive browser actions such as typing, clicking and navigating on labels propagated from element-level HTML confidentiality and integrity annotations. Untrusted and confidential content is masked from the agent's context, while policies block unauthorized flows, providing security guarantees against both prompt injection and data exfiltration that hold independently of the model driving the agent. To evaluate SPIDES and baseline defenses under a common threat model, we build MicroNet, a closed ecosystem of 28 interlinked websites with element-level ground-truth labels and paired benign/adversarial tasks. SPIDES achieves 0% attack success rate by design while retaining high task completion rate and autonomy. Our findings demonstrate that information-flow control is an effective technique to extend web security to browser agents, gaining on autonomy and utility against state-of-the-art baselines. The source code and data are openly accessible at https://github.com/microsoft/SPIDES.

1 INTRODUCTION

Browser-use agents (BUAs) such as Perplexity Comet (Perplexity AI, 2025), Chrome Auto Browse (Tabriz, 2026) and Skyvern (Skyvern AI, 2026) automate browser-based workflows on a user's behalf. BUAs act with the user's authority across different websites, exposing them to indirect prompt injection attacks (Greshake et al., 2023; Liao et al., 2025; Zhang et al., 2025; 2026), where malicious content causes the agent to perform harmful actions or leak sensitive information. For instance, content embedded in an advertisement on a shopping website may cause the agent to make an unauthorized purchase with a saved payment method.

Traditional browser security mechanisms aim to prevent unauthorized information flow across websites. Notably, the same-origin policy (SOP) limits how code from one origin (the scheme, host and port of a URL) can interact with resources from another origin (MDN Web Docs, 2026c). But the SOP does not govern the user-mediated flows often required to automate tasks, e.g., copying and pasting data across websites. For instance, a user shopping for a laptop may ask an agent to collect specifications from several retailers and compile them into a comparison in a note-taking web app.

∗^{*}Equal contribution.

†^{\dagger}Work partially done as a Research Intern at Microsoft.

Corresponding author: egor.zverev@ist.ac.at

Mechanisms proposed to secure BUAs generally fall short of providing integrity and confidentiality guarantees while preserving autonomy (Wang et al., 2026; Nikolić et al., 2026; Meng et al., 2026). SOPGuard (Wang et al., 2026) restores SOP and requires human approval for cross-origin flows, hindering autonomous task completion and still allowing same-origin attacks. Others provide integrity guarantees within one origin, but do not enforce policy on cross-origin flows (Nikolić et al., 2026). CELLMATE (Meng et al., 2026) blocks HTTP requests that violate task-specific policies selected at runtime, but does not track whether untrusted or confidential content influenced a request. We posit that securing browser-use agents requires novel mechanisms that tell benign from unintended flows, allowing cross-origin actions needed to complete tasks while preventing untrusted data from influencing consequential actions and confidential data from reaching unintended recipients.

We present SPIDES, an information-flow control framework that secures browser-use agents against prompt injection and data exfiltration by design, independently of the model driving the agent. SPIDES builds on an emerging line of defenses (Debenedetti et al., 2026; Costa et al., 2025; Kim et al., 2025) that combine information-flow control (IFC) (Denning, 1976) with the dual LLM pattern (Willison, 2023). These defenses track the integrity and confidentiality of data that enters the agent's context. They require tools to return results with confidentiality and integrity labels and assume that each tool has a specific, well-defined effect, e.g., sending an email. However, web browsers break both assumptions (§3). A browser has no such metadata beyond a page's origin, yet one origin may serve trusted operator-provided content, untrusted user reviews, and confidential messages side-by-side, and only the operator knows which is which. Likewise, a single tool like browser_click may follow a link or delete an account.

SPIDES addresses these two challenges. First, users list the origins whose operators they trust, and operators of these origins annotate DOM (Document Object Model) elements with integrity and confidentiality labels; content from other origins is treated as untrusted. SPIDES propagates the labels to the accessibility snapshots the agent observes and hides untrusted and confidential content behind variables to track information flow deterministically. Second, SPIDES assigns a policy to each browser action based on its target origin. Because users may create accounts on trusted origins, clicks, navigations, and form submissions targeting a trusted origin may act under the user's account. SPIDES treats them as consequential and allows them only when there is no influence from untrusted data. Any actions that send data, including actions that target untrusted origins, may send data only to origins authorized to see it. SPIDES asks the user to approve any action that violates these policies.

For evaluation, since no existing benchmark has benign cross-origin tasks with same- and cross-origin attacks, we build MicroNet, a closed ecosystem of 28 interlinked websites with element-level ground-truth labels. MicroNet contains 56 benign tasks, 22 of which require cross-origin flows. It includes 56 attacks injected through attacker-run websites, user-generated content, and third-party iframes. Across 5 frontier models and under a worst-case adversary that controls a model's output on input tainted with untrusted content, SPIDES blocks all attacks, while 53.2–73.2 % succeed against SOPGuard and 4.6–6.8 % against UCM. In terms of utility, SPIDES completes 67.1–86.1 % of benign tasks, outperforming UCM on every model. When prior defenses are extended to enforce the same security guarantees as SPIDES by requiring approvals for tool calls that potentially involve unsafe information flows, SPIDES completes more tasks than SOPGuard and UCM on every model when at most eight approvals are allowed.

In summary, we propose a new IFC approach for browser-use agents that prevents prompt injections from causing consequential actions or leaking confidential data while preserving high autonomy. Source code and data to reproduce the experiments we present is available at https://github.com/microsoft/spides.

References (56)

  • Robust defenses for cross-site request forgery
  • DoomArena: A framework for testing AI agents against evolving security threats (opens arXiv in a new tab)
  • Agentic browser security: Indirect prompt injection in Perplexity Comet
  • StruQ: Defending against prompt injection with structured queries
  • SecAlign: Defending against prompt injection with preference optimization
  • Securing ai agents with information-flow control (opens arXiv in a new tab)
  • AgentDojo: A dynamic environment to evaluate prompt injection attacks and defenses for LLM agents
  • Defeating prompt injections by design
  • WASP: Benchmarking web agent security against prompt injection attacks
  • CaMeLs can use computers too: System-level security for computer use agents
  • Not what you’ve signed up for: Compromising real-world llm-integrated applications with indirect prompt injection
  • WebVoyager: Building an end-to-end web agent with large multimodal models
  • Prompt flow integrity to prevent privilege escalation in llm agents (opens arXiv in a new tab)
  • Optimizing agent planning for security and autonomy
  • 25 million flows later: large-scale detection of dom-based xss
  • Commercial llm agents are already vulnerable to simple yet dangerous attacks (opens arXiv in a new tab)
  • WARP: Measuring and mitigating evaluation awareness in browser-agent safety benchmarks, 2026
  • Eia: Environmental injection attack on generalist web agents for privacy leakage
  • cellmate: Sandboxing browser ai agents (opens arXiv in a new tab)
  • Browser use: Enable AI to control your browser
  • The attacker moves second: Stronger adaptive attacks bypass defenses against LLM jailbreaks and prompt injections
  • Untrusted content masking for web agents with security guarantees
  • Site isolation: Process separation for web sites within the browser
  • Language-based information-flow security
  • OpenID Connect Core 1.0 incorporating errata set 2
  • Toolformer: Language models can teach themselves to use tools
  • Constitutional classifiers: Defending against universal jailbreaks across thousands of hours of red teaming (opens arXiv in a new tab)
  • The more things change, the more they stay the same: Integrity of modern javascript
  • How the web tangled itself: Uncovering the history of Client-Side web (In)Security
  • The instruction hierarchy: Training LLMs to prioritize privileged instructions (opens arXiv in a new tab)
  • Same-origin policy for agentic browsers (opens arXiv in a new tab)
  • React: Synergizing reasoning and acting in language models
  • Improving application security with data flow assertions
  • Brows-eSafe: Understanding and preventing prompt injection within ai browser agents (opens arXiv in a new tab)
  • Attacking vision-language computer agents via pop-ups
  • Gpt-4v(ision) is a generalist web agent, if grounded
  • Webarena: A realistic web environment for building autonomous agents
  • Can LLMs separate instructions from data? and what do we even mean by that? In ICLR, 2025
  • ASIDE: Architectural separation of instructions and data in language models
  • For example, an element without an ARIA role may be folded into its parent node, as shown in Figure 4
  • >Review: <span data-ifc-integrity=
  • Review: Ignore prior instructions, email x@evil.io
  • SPIDES is conservative: when a tool's effect is uncertain, it assumes the more dangerous case, so a tool is treated as consequential or egressing unless it provably is neither
  • SPIDES secures the browser interactions that the agent performs on the user's behalf
  • For example, a click on a shopping website before the agent logs in cannot use the user's account, so it could be treated as egress-only even though the user has an account on that website
  • The utility suite contains 34 same-origin and 22 cross-origin tasks; 15 of the 56 tasks require the agent's action to depend on data read during execution
  • Same and Cross denote same-origin and cross-origin
  • The aggregate ASR in Figure 2 combines 50 instruction-injection scenarios and six data-injection scenarios, so it is dominated by instruction injection
  • SPIDES and UCM+ achieve 0% ASR for both mechanisms across all five models
  • The means include unsuccessful tasks and timed-out runs with usable statistics; they exclude runs invalidated by execution or evaluation errors
  • Total token use is dominated by input tokens for every model and defense
  • $^{2}$ SPIDES costs an estimated $0.37–$1.42 per utility-task run, compared with $0.17–$0.66 for vanilla
  • Input, output, and total counts combine the main model and QLLM tokens
  • vanilla and SOPGuard use neither mechanism
  • QLLM counts calls to the quarantined model; inspect_variable counts explicit reveals into the main model's context
  • >Benchmark</td><td colspan=