WebTrap: Mid-course Hijacking Injection Attacks Against Browser Agent Navigation ProcessesWebTrap: Stealthy Mid-Task Hijacking of Browser Agents During Navigation
Translation in progress — untranslated text is omitted.
The researchers propose WebTrap, a mid-course hijacking prompt injection attack targeting browser agents. By fusing multi-step instructions, it binds the attack target to the user's goal, allowing the agent to continue the original task after completing the attack objective. The method also designs a context-based generation approach, aligning the injected content with the task environment and system instructions to improve hijacking success. Experiments on two browser agent tasks based on extended WASP and InjecAgent environments show that the method achieves a high attack success rate while maintaining the usability of the original system. The authors note that WebTrap exploits the agent's navigation vulnerabilities, binding the two goals too tightly, and standard defense mechanisms cannot restore normal system operation, reflecting a critical vulnerability where agents can be covertly hijacked in long-horizon tasks.
- In long-horizon web and file navigation, browser agents continuously read untrusted content. Existing prompt injections struggle to achieve end-to-end goals in complex environments and often reduce the success rate of the original user task.
- WebTrap injects at most three traps: decoy only reroutes, inertia writes the attack target as a prerequisite step, and payload executes at the restricted zone entry before returning. Injections align with the currently visible environment and adopt the style of system instructions.
- On the default model, extending WASP with one sample, Long Reddit ASR-E is 77.78%, and Long dual-objective success rate is 47.62%. In the file best-of-n, only WebTrap has a non-zero ASR-E at 55.00%. Segment deletion in the file setting reduces UUA to 0.00%.
- The authors limit the conclusions to the setting where injection is only possible into the user zone and the restricted zone's internals are not visible; experiments are in controlled web and file environments. UUA depends on the agent's own ability to complete long tasks. The authors state that evaluation should be extended to broader real-world deployments and more defenses.