# WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agents

DevFeed: [WebAgentGuard: A Reasoning-Driven Guard Model for Detecting Prompt Injection Attacks in Web Agents](<https://devfeed.tech/articles/webagentguard-a-reasoning-driven-guard-model-for-detecting-prompt-injection-attacks-in-web-agents-100247.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2604.12284>)

Author: Yulin Chen, Tri Cao, Haoran Li, Yibo Li, Yue Liu, Yufei He, Le Minh Khoi, Yangqiu Song, Shuicheng Yan, Bryan Hooi

Published: 2026-10-26T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Adversarial attacks](<https://devfeed.tech/topics/adversarial-attacks.md>), [Multi Agent Systems](<https://devfeed.tech/topics/multi-agent-systems.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Reinforcement learning](<https://devfeed.tech/topics/reinforcement-learning.md>), [computer-use](<https://devfeed.tech/topics/computer-use.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [abstract](<https://devfeed.tech/tags/abstract.md>), [adversarial](<https://devfeed.tech/tags/adversarial.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [attacks](<https://devfeed.tech/tags/attacks.md>), [autonomous](<https://devfeed.tech/tags/autonomous.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [building](<https://devfeed.tech/tags/building.md>), [can](<https://devfeed.tech/tags/can.md>), [content](<https://devfeed.tech/tags/content.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [defense](<https://devfeed.tech/tags/defense.md>), [model](<https://devfeed.tech/tags/model.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompt-injection](<https://devfeed.tech/tags/prompt-injection.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

WebAgentGuard detects prompt injections in web agents with a dedicated multimodal guard that operates in parallel with the agent, separating detection from the agent's own reasoning. The model is trained on a synthetic dataset spanning 164 topics and 230 visual and UI styles, using reasoning-intensive supervised fine-tuning followed by reinforcement learning. The abstract reports that it outperforms strong baselines across multiple benchmarks while preserving agent utility and adding no latency. These claims are limited to the abstract; it provides no benchmark details or evidence for assessing the reported results.

## Source excerpt

arXiv:2604.12284v2 Announce Type: replace Abstract: Web agents powered by vision-language models (VLMs) enable autonomous interaction with web environments by perceiving and acting on both visual and textual webpage content to accomplish user-specified tasks. However, they are highly vulnerable to prompt injection attacks, where adversarial instructions embedded in HTML or rendered screenshots can manipulate agent behavior and lead to harmful outcomes such as information leakage. Existing defenses, including system prompt defenses and direct fine-tuning of agents, have shown limited effectiveness. To address this issue, we propose a defense framework in which a web agent operates in parallel with a dedicated guard agent, decoupling prompt injection detection from the agent's own reasoning. Building on this framework, we introduce WebAgentGuard, a reasoning-driven, multimodal guard model for prompt injection detection. We construct a synthetic multimodal dataset using GPT-5 spanning 164 topics and 230 visual and UI design styles, and train the model via reasoning-intensive supervised fine-tuning followed by reinforcement learning. Experiments across multiple benchmarks show that WebAgentGuard consistently outperforms strong baselines while preserving agent utility, without introducing additional latency.