WebInject: Prompt Injection Attack to Web Agents
Xilong Wang, John Bloch, Zedian Shao, Yuepeng Hu, Shuyan Zhou, Neil Zhenqiang Gong
Abstract
Multi-modal large language model (MLLM)-based web agents interact with webpage environments by generating actions based on screenshots of the webpages. In this work, we propose WebInject, a prompt injection attack that manipulates the webpage environment to induce a web agent to perform an attacker-specified action. Our attack adds a perturbation to the raw pixel values of the rendered webpage. After these perturbed pixels are mapped into a screenshot, the perturbation induces the web agent to perform the attacker-specified action. We formulate the task of finding the perturbation as an optimization problem. A key challenge in solving this problem is that the mapping between raw pixel values and screenshot is non-differentiable, making it difficult to backpropagate gradients to the perturbation. To overcome this, we train a neural network to approximate the mapping and apply projected gradient descent to solve the reformulated optimization problem. Extensive evaluation on multiple datasets shows that WebInject is highly effective and significantly outperforms baselines.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- PromptLocate: Localizing Prompt Injection Attacks cites Formalizing and Benchmarking Prompt Injection Attacks and Defenses
- PromptLocate: Localizing Prompt Injection Attacks cites Prompt Injection Attack to Tool Selection in LLM Agents
- Causal Detection of Multi-Step LLM Agent Attacks cites InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents
- Causal Detection of Multi-Step LLM Agent Attacks cites Formalizing and Benchmarking Prompt Injection Attacks and Defenses
- Attacking Vision-Language Computer Agents via Pop-ups cites GPT-4V(ision) is a Generalist Web Agent, if Grounded
- Attacking Vision-Language Computer Agents via Pop-ups cites InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents
- Measuring Real-World Prompt Injection Attacks in LLM-based Resume Screening cites PromptLocate: Localizing Prompt Injection Attacks
- Measuring Real-World Prompt Injection Attacks in LLM-based Resume Screening cites Formalizing and Benchmarking Prompt Injection Attacks and Defenses
- Measuring Real-World Prompt Injection Attacks in LLM-based Resume Screening cites Prompt Injection Attack to Tool Selection in LLM Agents
- Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation Evaluation cites Formalizing and Benchmarking Prompt Injection Attacks and Defenses
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use Agents cites Attacking Vision-Language Computer Agents via Pop-ups
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use Agents cites GPT-4V(ision) is a Generalist Web Agent, if Grounded
- Prompt Injection Attack to Tool Selection in LLM Agents cites InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents
- Prompt Injection Attack to Tool Selection in LLM Agents cites Formalizing and Benchmarking Prompt Injection Attacks and Defenses
Cited by top-tier papers9
- VPI-Bench: Visual Prompt Injection Attacks for Computer-Use AgentsTri Cao, Bennett Lim, Yue Liu, Yuan Sui et al.ICLR 2026 · 45 citations
- PromptLocate: Localizing Prompt Injection AttacksYuqi Jia, Yupei Liu, Zedian Shao, Jinyuan Jia et al.S&P 2026 · 35 citations
- Measuring Real-World Prompt Injection Attacks in LLM-based Resume ScreeningMohan Zhang, Yuqi Jia, Zhen Tan, Steven Jiang et al.USENIX Security 2026 · 4 citations
- Context Contamination in LLM Analysis of Network Security Logs: Poison with Passive Prompt Injection and Mitigation EvaluationRabimba Karanjai, Yang Lu, Hemanth Hegadehalli Madhavarao, Lei Xu et al.USENIX Security 2026 · 4 citations
- Causal Detection of Multi-Step LLM Agent AttacksViraaji Mothukuri, Reza M. PariziICML 2026 · 2 citations
Builds on12
- GPT-4V(ision) is a Generalist Web Agent, if GroundedBoyuan Zheng, Boyu Gou, Jihyung Kil, Huan Sun et al.ICML 2024 · 496 citations
- Formalizing and Benchmarking Prompt Injection Attacks and DefensesYupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia et al.USENIX Security 2024 · 308 citations
- Prompt Injection Attack to Tool Selection in LLM AgentsJiawen Shi, Zenghui Yuan, Guiyao Tie, Pan Zhou et al.NDSS 2026 · 181 citations
- InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model AgentsQiusi Zhan, Zhixiang Liang, Zifan Ying, Daniel KangACL Findings 2024 · 147 citations
- Attacking Vision-Language Computer Agents via Pop-upsYanzhe Zhang, Tao Yu, Diyi YangACL 2025 · 99 citations
Related papers
- Manipulating Multimodal Agents via Cross-Modal Prompt InjectionLe Wang, Zonghao Ying, Tianyuan Zhang, Siyuan Liang et al.ACM MM 2025 · 8 citations
- A Large-scale Measurement of In-Page Prompt Injections Against LLM Web AgentsSoheil Khodayari, Xuenan Zhang, Bhupendra Acharya, Giancarlo PellegrinoCCS 2026
- It's a TRAP! Task-Redirecting Agent Persuasion Benchmark for Web AgentsKarolina Korgul, Yushi Yang, Arkadiusz Drohomirecki, Piotr Blaszczyk et al.ICML 2026 · 8 citations
- MUZZLE: Adaptive Agentic Red-Teaming of Web Agents Against Indirect Prompt Injection AttacksGeorgios Syros, Evan Rose, Brian Grinstead, Christoph Kerschbaumer et al.USENIX Security 2026 · 18 citations
- AgentBreaker: Evaluating Context-Aware Indirect Prompt Injection Risks in Modern Web AgentsYongbi Son, Changoo Lee, Dongwon Shin, Byoungyoung Lee et al.ISSTA 2026
