TL;DR
SPIDES is a deterministic security framework for LLM-driven browser agents that prevents prompt injection and data exfiltration by enforcing fine-grained information-flow control (IFC). By labeling individual web elements and masking sensitive content, SPIDES achieves a 0% attack success rate across multiple frontier models while maintaining high autonomy for complex, cross-origin tasks.
What Problem Does This Paper Address?
Browser-use agents (BUAs)—like Perplexity Comet or Skyvern—automate complex web workflows by acting with a user’s authority across different websites. However, this flexibility creates a massive security hole: indirect prompt injection (IPI). An attacker can embed malicious instructions in a webpage (e.g., a fake product review) that tricks the agent into performing harmful actions, such as making unauthorized purchases or leaking private data.
Traditional web security, like the Same-Origin Policy (SOP), is a blunt instrument in this context. Restoring SOP to agents is often insufficient (it doesn't stop an agent from leaking private data to a public field on the same site) and unnecessary (many legitimate tasks require moving data across different origins, like comparing prices between retailers). The challenge is to create a defense that is "model-agnostic"—meaning it doesn't rely on the LLM being "smart" enough to resist an attack—while still allowing the agent to be useful and autonomous.
Methods
SPIDES introduces a system-level defense based on Information-Flow Control (IFC) and the Dual LLM pattern.
- Element-Level Labeling: Unlike previous methods that trust entire websites (origins), SPIDES relies on website operators to annotate specific HTML elements with integrity (
data-ifc-integrity) and confidentiality (data-ifc-readers) labels. - Selective Masking: When an agent observes a page, any content that is "Untrusted" (like user reviews) or "Non-Public" (like a saved credit card) is hidden behind opaque variables (e.g.,
[var_1]). The agent's main "planning" LLM only sees these placeholders. - Information Flow Tracking: If the agent needs to see the actual data to complete a task, it calls an
inspect_variabletool. This "taints" the agent's context. SPIDES then tracks this taint to ensure that untrusted data never influences a "consequential action" (like clicking a 'Buy' button) and that private data never flows to an unauthorized destination. - Action Gating: SPIDES intercepts every browser tool call (click, type, navigate) and checks it against a strict security policy.
The logic for these policies is summarized in the paper's classification of Playwright tools:
As shown in Figure 2, SPIDES distinguishes between simple observations (always allowed) and interactions that could egress data or have consequential effects, applying different logic depending on whether the target origin is trusted.
Datasets
To evaluate SPIDES, the authors developed MicroNet, a new benchmark for browser agent security.
- Structure: A closed ecosystem of 28 interlinked websites (470 pages) including shops, social networks, and search engines.
- Ground Truth: Every element in MicroNet is manually labeled for integrity and confidentiality.
- Tasks: It includes 56 benign tasks (many requiring cross-origin flows) and 56 attack scenarios covering integrity violations (unauthorized actions) and confidentiality leaks (data exfiltration).
The authors argue that MicroNet is more comprehensive than existing benchmarks like WASP or SOPBench, which often lack data-dependent tasks or same-origin attack vectors.
Key Insights and Ideas
- Deterministic > Probabilistic: Most current defenses rely on "alignment" or filters, which are probabilistic and can be bypassed by adaptive attackers. SPIDES is deterministic; it blocks attacks by design at the system level.
- The "Byzantine" Adversary: The authors evaluate SPIDES under a "worst-case" assumption where the attacker completely controls the LLM's output if the input is tainted. Even under these extreme conditions, the IFC policies hold.
- Context Tainting is Essential: The paper demonstrates that simply masking data isn't enough. You must track how that data influences the agent's future decisions. If an agent reads an untrusted instruction, its entire "train of thought" becomes untrusted for the rest of the session.
Key Results
- Security: SPIDES achieved a 0% attack success rate (ASR) across five frontier models (including versions of GPT and Claude). In contrast, the baseline "vanilla" agents had ASRs as high as 96%.
- Utility: SPIDES maintained a high Task Completion Rate (67.1–86.1%), significantly outperforming other masking-based defenses like UCM.
- Autonomy: When compared under the same security guarantees, SPIDES required fewer human approvals (Human-in-the-loop) to complete tasks than SOPGuard or UCM.
Limitations and Future Work
- Deployment Burden: SPIDES requires website operators to adopt new HTML annotations. While similar to existing accessibility (ARIA) standards, it still represents a hurdle for web-wide adoption.
- DOM Integrity: SPIDES assumes the underlying webpage hasn't been compromised by traditional attacks like Cross-Site Scripting (XSS). If an attacker can manipulate the DOM, they could potentially mislabel elements to bypass SPIDES.
- Coarse Confidentiality: The current reader set abstraction (based on origins) might not be granular enough to distinguish between different users on the same website, potentially allowing for same-origin privacy leaks.
Future work could involve automating the labeling process or refining the confidentiality model to handle multi-user origins more effectively.
Summary updated