Prismata: Confining Cross-Site Prompt Injection in Web Agents

Autonomous web agents promise to automate everyday browsing tasks, but inherit one of the web's oldest attack surfaces. Cross-Site Scripting proved that mixing trusted and untrusted content is dangerous, even on benign pages. Agents resurface this risk by interpreting natural language as instructions, allowing third-party and user-generated content to hijack the agent via prompt injection. The core challenge is that deriving a task-specific security policy requires reasoning over page structure that is entangled with the attacker's content. We present Prismata, a defense enforcing contextual least privilege for web agents, constraining both what the agent sees and what it can do. Prismata's dynamic trust derivation produces permission labels for page content, with structural confinement guarantees, inspired by classical integrity models, that bound any labeling errors so that labels can only decrease in privilege and mislabelings are bounded. Prismata's mechanical confinement enforces these labels by redacting content and restricting agent capabilities. Importantly, these mechanisms require no developer annotations, so Prismata supports the long tail of websites. Across recent published web agent attacks, including adaptive variants, Prismata substantially reduces attack success while preserving benign task utility.

Paper

References (94)

Scroll for more · 38 remaining

Similar papers

Agents reading web pages, emails and repository files are hijacked by prompt injections hidden in untrusted content, yet 2026 benchmarks show deployed guards over-block benign text, making them unusable inline. A naive single prompt asking a base model whether text is an injection fails because without the agent's declared task it cannot separate legitimate imperative content, such as a README's install instructions, from instructions subverting the agent, returning a bare score with no offending span or operating point. Evaluate a task-conditioned LLM judge seeing the declared task and permitted capabilities alongside the untrusted output, using constrained structured decoding to emit is_injection, targeted_capability, quoted span and confidence, retrieving injection patterns for few-shot grounding, and applying a threshold calibrated on a benign corpus with self-consistency voting. Measure ROC-AUC, recall at sub-one-percent false-positive rate, span-localization precision and Brier calibration on AgentDojo-style labeled attack traces plus held-out benign corpora, beating a naive single-prompt base-model classifier and a Llama-Guard-style guardrail. Deliver as the prototype a minimal runnable Python MCP server (stdio) exposing the priced AI tool screen_tool_output that invokes a language or ML model to produce its output, with a typed input/output schema, an x402-style pay-per-call metering stub that records a per-call price in USDT and emits a settlement receipt, and one smoke test that exercises the tool end to end.Dogukan Ali Gundogan2026 · Zenodo (CERN European Organization for Nuclear Research) In Library
Agents reading web pages, emails and repository files are hijacked by prompt injections hidden in untrusted content, yet 2026 benchmarks show deployed guards over-block benign text, making them unusable inline. A naive single prompt asking a base model whether text is an injection fails because without the agent's declared task it cannot separate legitimate imperative content, such as a README's install instructions, from instructions subverting the agent, returning a bare score with no offending span or operating point. Evaluate a task-conditioned LLM judge seeing the declared task and permitted capabilities alongside the untrusted output, using constrained structured decoding to emit is_injection, targeted_capability, quoted span and confidence, retrieving injection patterns for few-shot grounding, and applying a threshold calibrated on a benign corpus with self-consistency voting. Measure ROC-AUC, recall at sub-one-percent false-positive rate, span-localization precision and Brier calibration on AgentDojo-style labeled attack traces plus held-out benign corpora, beating a naive single-prompt base-model classifier and a Llama-Guard-style guardrail. Deliver as the prototype a minimal runnable Python MCP server (stdio) exposing the priced AI tool screen_tool_output that invokes a language or ML model to produce its output, with a typed input/output schema, an x402-style pay-per-call metering stub that records a per-call price in USDT and emits a settlement receipt, and one smoke test that exercises the tool end to end.Dogukan Ali Gundogan2026 · Zenodo (CERN European Organization for Nuclear Research) In Library
© 2026 NYSGPT2525 LLC