← Lab /AI/ML

Untrusted Content Masking restores isolation for web agents by redacting untrusted DOM regions

Masking untrusted DOM regions enables web agents to observe pages without processing adversarial content, preserving security guarantees

AI/ML arXiv 6 Jul 2026 Defense Prototype evidence

Published as “Untrusted Content Masking for Web Agents with Security Guarantees”

Why it matters

UCM enables deployment of web agents with provable protection against prompt-injection attacks at a modest cost, making secure agentic browsing more practical.

Summary

Untrusted Content Masking (UCM) blocks all strengthened WASP prompt-injection attacks (0% attack success rate) while preserving task utility, incurring a moderate cost overhead of up to 1.84×. The paper evaluates on ten custom sites and the WebArena GitLab benchmark, showing utility is maintained across both untrusted-required and untrusted-not-required tasks.

What they found 2

  1. Utility is preserved while cost increases up to 1.84× under UCM.

    “UCM preserves agent utility with up to 1.84× cost increase.”

  2. UCM blocks all strengthened WASP attacks.

    “we seed pages with strengthened WASP attacks and find that none succeed against UCM (0% attack success rate).”

Caveats 4

  • The Agent cannot solve tasks that require strings from untrusted content, such as “What new feature is this issue requesting?”.
  • To handle such tasks the Agent must declare them unsolvable and then use a fallback Q-Model with permitted string output, which relies on user approval.
  • Our main experiments assume an active honest page owner who labels untrusted regions.
  • Data-flow attacks are a known limitation of control-flow-protecting defenses, which prior work mitigates with action-level security policies and user confirmation for sensitive actions.

What’s new here 4

  • Masks untrusted DOM regions before they reach the web agent, eliminating the attack surface.
  • Introduces a type-constrained Quarantined Model (Q-Model) that returns only structured data from untrusted content.
  • Demonstrates automated trust-boundary inference from DOM structure using an LLM, removing the need for manual labeling.
  • Applies the defense to real-world sites (e.g., GitLab) with minimal utility loss.