WebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigation
Not on the map. Why?
Abstract (arXiv)
Browser agents are increasingly deployed in long-horizon tasks, which require executing extended action chains to accomplish user goals. However, this prolonged execution process provides attackers with more opportunities to inject malicious instructions. Existing prompt injection attacks against browser agents expose two key gaps: (1) low effectiveness, as attacks optimized for toy baselines fail to achieve end-to-end goals in real-world scenarios with complex environments and longer steps; (2) weak stealthiness, since most attacks pit the attack goal against the user goal, causing a significant drop in system usability under attack. To address these gaps, we propose WebTrap, a mid-task hijacking injection attack. It employs multi-step instruction fusion steering to seamlessly combine both goals, enabling the agent to resume the original user task after executing the attack goal. Furthermore, we design a context-grounded generation method to align the injected content with the task environment and system instructions, maximizing the hijacking success rate. Extensive experiments on two browser agent tasks, based on extended WASP and InjecAgent environments, demonstrate that our method achieves a high attack success rate while preserving the usability of the original system. We find that WebTrap exploits the agent's navigation vulnerabilities, binding the two goals so tightly that standard defense mechanisms cannot restore the system to normal operation. These findings reveal a critical vulnerability in agent systems during long-horizon tasks that they can be stealthily hijacked.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 25 of its 39 references that are in the map. First posted on arXiv 8 May 2026.
Builds on
25 of 39 references.
References · 25
- 2025Qwen3 Technical Reportcited by 8,195
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,211
- 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,134
- 2025Kimi K2: Open Agentic Intelligencecited by 523
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agentscited by 476
- 2025GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Modelscited by 446
- 2024WorkArena: How Capable Are Web Agents at Solving Common Knowledge Work Tasks?cited by 348
13 more
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 341
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024Windows Agent Arena: Evaluating Multi-Modal OS Agents at Scalecited by 212
- 2024Agent S: An Open Agentic Framework that Uses Computers Like a Humancited by 182
- 2024WebLINX: Real-World Website Navigation with Multi-Turn Dialoguecited by 177
- 2024OmniACT: A Dataset and Benchmark for Enabling Multimodal Generalist Autonomous Agents for Desktop and Webcited by 156
- 2024AssistantBench: Can Web Agents Solve Realistic and Time-Consuming Tasks?cited by 155
- 2024EIA: Environmental Injection Attack on Generalist Web Agents for Privacy Leakagecited by 146
- 2025WASP: Benchmarking Web Agent Security Against Prompt Injection Attackscited by 140
- 2024Attacking Vision-Language Computer Agents via Pop-upscited by 112
- 2025Can Indirect Prompt Injection Attacks Be Detected and Removed?cited by 43
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniquescited by 31
- 2025TopicAttack: An Indirect Prompt Injection Attack via Topic Transitioncited by 11
Built on by
Citing papers per year: 2026: 2.
2 papers.