WebMirage hijacks visual web agents' browser operations with adversarial imagesAdversarial Images Hijack Web Agents from Visual Grounding to Browser Execution
WebMirage generates local adversarial images through role slot recombination and data-flow analysis, achieving an average ASR-S of 91.9% across 4 agents and 6 VLMs.
White-box red-team setting: the attacker offline has full white-box access to the target agent's code and an open-weight VLM, and knows coarse-grained attributes of the website; at test time, the attacker can only control one local third-party image rendered on the webpage, cannot modify the DOM or inject text instructions, and cannot know the candidate identifiers in advance.
- Multimodal web agents rely on visual grounding to perform browser operations. Existing adversarial attacks mainly target model reasoning or assume a fixed webpage context, without explicitly considering structured input processing and action post-processing, so attack success at the model level cannot translate into control at the browser execution level.
- Propose the WebMirage framework, formalizing red-teaming as an end-to-end "grounding-to-execution" problem. Through role slot abstraction and webpage recombination, it simulates element competition and position shifts, and uses static data-flow analysis to align optimization targets with the key tokens preserved by action extraction logic.
- Across 4 agents, 6 VLMs, and 2,250 tasks, WebMirage achieves an average ASR-S of 91.9%, while the strongest baseline is only 17.4%. On SeeAct, the average ASR-M reaches 86.9%; transfer within the same model family achieves ASR-S of 81.2%–93.5%.
- Coordinate-based agents are outside the scope of this study; attack effectiveness decreases as perturbation budget and target rendering area shrink; dynamic identifier randomization can suppress attack success rate but causes clean task accuracy to drop to 15.9%; ASR-S across model families drops to 4.5%–23.8%.
- Evaluated models
- LLaVA-v1.5-13BLLaVA-v1.6-34BMiniCPM-o-8BPhi-3-Vision-4BQwen2-VL-7BCogVLMMiniCPM-V 2.5MiniCPM-V 2.6Phi-3.5 VisionCogAgentVILAShareGPT4VOpenFlamingoMini-Gemini
- Benchmarks
- 13 public websites (Retail, Accommodation, Tutoring, Home Service)VisualWebArena (OneStopShop)Mind2Web
- Metrics
- ASR-SASR-MMTRAcc.NLL
The researchers propose WebMirage, an end-to-end red teaming framework for visual web agents, which applies local visual perturbations to controlled images to make the agent select attacker-controlled content and execute corresponding browser operations. The framework uses role slot abstraction and webpage restructuring to model competition among candidate elements, and uses dataflow analysis to align the optimization objective to the post-action processing stage, retaining only the tokens that determine browser commands. Across 2250 tasks covering four agent configurations, six VLM backbones, 13 public websites, and sandbox benchmarks, WebMirage achieves an average attack success rate of 91.9%, compared to 17.4% for the strongest baseline. Under three existing agent-level defenses, the attack success rate remains between 86.5% and 91.9%; an adaptive defense that randomizes candidate identifiers reduces the success rate from 93.8% to 11.7%, but clean task accuracy also drops from 100% to 15.9%.
Why it was selectedThe paper models visual red-teaming as an end-to-end process from visual grounding to browser execution, demonstrating the attack's success rate across multiple agent configurations and the coverage of existing defenses.
Related events and news
1 events · 1 news mentions
- This event's paper
WebMirage 对抗图像劫持 Web Agent 执行
News that mentions this paper
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:决策性模型护栏也能被攻击者绕过
Adversarial Images Hijack Web Agents from Visual Grounding to Browser Execution(https://arxiv.org/abs/2610.09240)
Paper analysis
What problem does this paper attempt to solve?
Existing adversarial attacks on multimodal web agents ignore the full pipeline from visual grounding to browser execution, making model-level attacks difficult to translate into execution control.
Multimodal web agents face security vulnerabilities in which adversarial images hijack browser operations across the full pipeline from visual grounding to browser execution.
- Problem scenario and importance: Modern web agents based on large vision-language models (VLMs) can process screenshots, select candidate UI elements, and convert model outputs into browser actions. Because these agents need to perform critical browser operations such as purchases, bookings, and form submissions, untrusted webpage content becomes a direct attack surface.
- Limitations of existing methods: Prompt injection attacks (e.g., EIA, WIPI) rely on injecting text instructions; among visual perturbation attacks, VWA-Adv assumes a fixed webpage context and only targets intermediate text representations, while Chameleon optimizes fixed hardcoded outputs for all samples. Existing attacks all model around model inference, ignoring structured input candidate construction and action post-processing, resulting in an average ASR of no more than 17.4% at the actual execution level.
- Core observation and hypothesis: The authors believe the key question is whether adversarial visual content can remain effective across the full pipeline covering structured input processing to final browser execution. Webpage dynamics cause candidate element reordering, neighbor permutation, and identifier changes, causing model-level outputs and attacker-controlled elements to lose alignment across different renderings.
- Threat model:
- Attacker goal: Induce the agent to select the attacker-controlled candidate element under different renderings and execute the corresponding browser action.
- Victim system: A visually grounded web agent that assists users with open-ended web tasks such as shopping, booking, or hiring.
- Offline synthesis capability: Has white-box access to obtain the target agent's code, open-weight VLM parameters, structured input construction, output parsing, and action execution logic, and knows coarse-grained attributes of the target website, but does not know the exact request or page instance at test time.
- Test-time capability: Can only control one local third-party image rendered on the webpage (e.g., a product thumbnail or avatar), cannot modify the website code or DOM, cannot inject text instructions, cannot change the agent runtime, and the perturbation is fixed before rendering.
- Proposed approach in the paper: The paper proposes the WebMirage framework, which uses role-slot abstraction to model element competition and positional shifts, and uses data-flow analysis to align the optimization objective with the model output tokens that determine browser actions.
What related research exists?
Related research covers prompt injection and visual adversarial perturbations, but existing work does not model structured candidate construction and downstream action post-processing.
Web agents and general systems
- WebGPT (2022) et al.: Early text-centric agents demonstrated LLMs' ability to browse and collect web evidence using tools; WebShop (2022/2023), Mind2Web (2023), and WebArena (2024) primarily interact with the web through structured text representations such as DOM and accessibility trees.
- SeeAct (2024), WebVoyager (2024) et al.: Recent general multimodal agents combine rendered screenshots with the VisualWebArena (2024) environment and Set-of-Mark prompting (2023) to capture page semantics that are difficult to recover from HTML alone.
Prompt injection in web agents
- WIPI (2024), PopupAttack (2025), AdInject (2025): Hijack tasks by injecting hidden or misleading content through DOM elements, popup overlays, or online ads, respectively.
- EIA (2024): Injects HTML elements with misleading instructions next to legitimate form fields to steal privacy. The authors note these attacks rely on agents following injected text instructions rather than manipulating their visual grounding of candidate elements.
- SecureWebArena (2025) and BrowserART (2025): Provide systematic safety evaluation benchmarks for instruction-channel threat vectors.
Visual perturbation attacks against web agents
- WebInject (2025): Assumes the attacker has white-box model access and can control the entire rendered webpage, inducing specified actions by optimizing full-page perturbations.
- VWA-Adv (2025): Perturbs local images under a restricted threat model, altering the model's semantic interpretation via embedding similarity or intermediate image descriptions.
- Chameleon (2025): Uses white-box optimization to make local triggers robust to changes in position and surrounding visual context. The authors note Chameleon optimizes triggers to the same hardcoded model output across all contexts, without considering dynamic candidate mapping and downstream action parsing; moreover, neither VWA-Adv nor Chameleon models structured candidate construction before inference or action parsing after inference.
Adversarial examples for visual inputs
- Image classification and multimodal adversarial examples (Goodfellow et al. 2015, Madry et al. 2018, Luo et al. 2024, Schlarmann and Hein 2023, Shayegani et al. 2023): Typically assume full control of the input image and evaluate model predictions; EoT (1993/2018) improves robustness through optimization over geometric transformations. The authors note that in web agents, the primary source of variation is compositional change rather than geometric change.
Baseline methods and benchmarks
- Comparison baselines: Include the instruction injection attack EIA, the text intermediate representation attack VWA-Adv, and the direct action prediction attack Chameleon.
- Benchmarks used: Include a task set adapted from Mind2Web and deployed across 13 real websites, as well as the OneStopShop sandbox benchmark from VisualWebArena.
The authors position this work as an end-to-end attack method covering the full pipeline from visual grounding to browser execution, addressing the shortcomings of prior work that focused only on isolated model inference or text intermediate representations by explicitly modeling dynamic candidate set mapping and action post-processing.
How does the paper address this problem?
Propose the WebMirage framework, achieving end-to-end hijacking through role slot abstraction, webpage recombination, and action target alignment based on data-flow analysis.
WebMirage is a pipeline-aware end-to-end red-team attack framework that models element competition through role-slot modeling and webpage recombination, and uses static data-flow analysis to align the optimization objective with executable browser commands.
Threat-driven observation modeling and role slots
- Webpage visual decomposition and observation interface: Represent the rendered webpage as a set of N visually coherent regions S = {(v_i, b_i)}_{i=1}^N. The input received by the agent is a screenshot and a candidate set O = (I_screen, C_cand), where C_cand contains interactive region labels, bounding boxes, and text descriptions.
- Role-slot abstraction: Define interchangeable positions providing the same functional role as a role-slot set K_slot. Determine compatible slots based on semantic role label r_i and relative width/height difference thresholds ε_w, ε_h:
Kslot(rt, st) = {k ∈ [N] ∣ rk = rt, |wk − wt|/wt ≤ εw, |hk − ht|/ht ≤ εh} This formula defines the set of slot indices that have the same semantic role as the target element and whose size relative deviation is within the thresholds. Role labels are obtained through manual annotation or a lightweight element classifier.
Webpage recombination and mutation constraints
- Companion variation and positional shift: Fix the slot of the attack image, sample from a benign image pool Z to fill the remaining l-1 slots to simulate companion competition; fix the companion images, place the attack image in different compatible slots k, and reconstruct the candidate set q_k and target output y_{t,k}.
- Local recombination scope: Only recombine regions within the target role-slot set; regions outside the slots remain unchanged.
Unified attack objective and differentiable preprocessing
- Perturbation constraint and differentiability: Restrict the perturbation within an ℓ∞ ball of radius ε (default 16/255). For non-differentiable image libraries used by agents (e.g., PIL), rewrite resizing and patch extraction using PyTorch tensor operations so gradients can propagate.
- Joint optimization objective: At each step, jointly sample slot positions and companion images, and uniformly optimize the expected loss:
minδ 𝔼k ∈ Kslot, z ∼ 𝒵l−1 [L(I(ϕδ(vt), bk, z), qk, yt,k)] This objective function represents minimizing the expected loss of the model output corresponding to the candidate label over all sampled role-slot positions and companion image combinations.
Action objective alignment based on data-flow analysis
- Post-processing alignment challenge: Before agent execution, model outputs are filtered through regex or rule-based parsing, discarding explanatory text and retaining only action commands; directly optimizing the full response dilutes gradients and cannot guarantee action matching.
- Static data-flow analysis: With the VLM raw response as the data source and the parameters passed to the execution interface as the data sink, implement context-sensitive and flow-sensitive interprocedural analysis in CodeQL, using string analysis and field-sensitive tracking to identify the token positions that determine executable actions. During optimization, only compute the action-level loss L_action on these tokens. Appendix F provides the specific prompt templates and baseline configurations.
What experiments did the paper conduct?
Evaluated on 4 agents, 6 VLMs, and 2,250 tasks, WebMirage achieves an average ASR-S of 91.9%.
Experimental Setup
- Models under test: Public website experiments use 5 VLM backbones: LLaVA-v1.5-13B, LLaVA-v1.6-34B, MiniCPM-o-8B, Phi-3-Vision-4B, Qwen2-VL-7B; sandbox experiments use CogVLM; transfer experiments additionally include MiniCPM-V 2.5/2.6, Phi-3.5 Vision, CogAgent, VILA, ShareGPT4V, OpenFlamingo, Mini-Gemini.
- Agent frameworks and configurations: 4 configurations, including SeeAct and WebVoyager on real websites, and two observation variants in the VisualWebArena sandbox (screenshot + accessibility tree, and screenshot + Set-of-Mark, both using BLIP-2 to generate alt-text).
- Datasets and task scale: Covers tasks from 13 real websites (adapted from Mind2Web, including 4 scenarios: retail, accommodation, home services, tutoring, totaling 1,710 tasks) and VisualWebArena's OneStopShop tasks (540 tasks), for a total of 2,250 tasks.
- Comparison baselines: EIA (prompt injection), VWA-Adv (visual perturbation against intermediate representations), Chameleon (direct action prediction visual attack).
- Metric definitions: Step-level attack success rate (ASR-S, proportion of steps where the browser executes an action on the attack target), multi-step attack success rate (ASR-M, proportion of runs that successfully select and complete the final target), mistaken trigger rate (MTR, proportion of unrelated decision points that mistakenly select the attack target), clean task accuracy (Acc.), negative log-likelihood (NLL).
- Evaluation and sample construction: All tasks require a successful clean run and selection of a non-attack candidate; success is determined by actual browser execution of actions (not LLM judge scoring); GPT-4o is used to generate disjoint optimization and test sets of user requests and action histories; the paper does not report the number of repeated multi-round test runs.
Main Results
Swipe horizontally to read the table
Agent configuration (sample size) EIA ASR-S VWA-Adv ASR-S Chameleon ASR-S WebMirage ASR-S WebMirage MTR SEEACT (N = 1,710) 6.2% 14.5% 16.7% 90.0% 1.8% WEBVOYAGER (N = 1,710) 5.0% 15.6% 17.9% 85.4% 3.0% VWA (AcTree) (N = 540) 9.6% 8.9% 18.4% 96.2% 2.8% VWA (SoM) (N = 540) 4.8% 9.3% 16.6% 95.8% 2.1% Note: Data from Table 1. SEEACT and WEBVOYAGER are averages over 5 VLM backbones; both VWA variants use CogVLM.
- Attack success rate greatly surpasses baselines: The authors report WebMirage achieves ASR-S of 85.4%–96.2% across four agent configurations, exceeding the strongest baseline Chameleon (16.6%–18.4%) by 67.5–79.2 percentage points.
- Mistaken trigger rate remains low: WebMirage's MTR ranges from 1.8%–3.0%, lower than EIA and VWA-Adv in all configurations, and the lowest among all methods on the two real-world agents; Chameleon has a slightly lower MTR in sandbox configurations but lags far behind in ASR.
- Reasons for baseline inadequacy: The authors argue EIA and VWA-Adv struggle to induce actual UI operations through injected text or intermediate representations; although Chameleon directly targets action prediction, its fixed output target does not adapt to changing candidate mappings and post-processing logic.
Webpage Variability and Semantic Perturbation Robustness
- Test content: Evaluates attack performance under unseen renderings (unseen slots or unseen peer competition) and semantically rewritten requests (Table 4, Table 5, Figure 5).
- Experimental results: Under unseen renderings, ASR-S in Retail, Accomm., and Tutoring scenarios drops only 1.6–4.8 percentage points compared to seen renderings, while Home Service drops 5.2–8.1 percentage points (Table 4); under 30 semantically rewritten requests generated by GPT-5.5, macro-average ASR decreases slightly from 94.1% to 89.8% (Table 5); across 420 retail tasks, even with 3 simultaneous position shifts and peer changes, the average ASR-S across 5 backbones remains 80.0% (Figure 5(c)).
- Authors' interpretation: The authors argue attack effectiveness does not depend on a fixed peer set, target position, or specific query wording.
Cross-Model Backbone Transferability
- Test content: Freezes perturbations optimized on a single source model and tests transfer to same-family and cross-architecture models under identical settings (Table 6).
- Experimental results: Within the same model family (e.g., MiniCPM-o to MiniCPM-V 2.5/2.6, CogVLM to CogAgent, etc.), target model ASR-S remains 81.2%–93.5%, with relative NLL reduction of the attack intent command of 65.7%–93.4%; however, across architectures, ASR-S drops to 4.5%–23.8%, with relative NLL reduction of 31.6%–70.0%.
- Authors' interpretation: The authors note that high within-family transferability indicates perturbations exploit features shared within the family; while cross-architecture transfer changes model confidence, it cannot provide reliable execution-level control.
Defense Countermeasure Evaluation
- Test content: Evaluates image-level cleaning (JPEG compression, Gaussian blur, uniform noise), existing agent-level defenses (WebSentinel, Consistency Check, WebGuard), and an adaptive defense (dynamic identifier randomization) (Table 8, Table 9).
- Experimental results: Under Gaussian blur, ASR-S remains 82.5% (Acc. 100%); high-intensity uniform noise reduces ASR-S to 45.7% but clean accuracy also drops to 58.5% (Table 8); under the three existing agent-level defenses, ASR-S remains 86.5%–91.9% (Table 8); dynamic identifier randomization reduces ASR-S from 93.8% to 11.7%, but clean task accuracy drops from 100% to 15.9% (Table 9).
- Authors' interpretation: The authors argue existing defenses only monitor injected text, inconsistent image descriptions, or high-risk actions, and cannot defend against candidate visual grounding attacks; adaptive identifier randomization can suppress fixed perturbations but at a significant utility cost.
Additional Ablations and Analyses
- Action-level data-flow supervision ablation: Aligning supervision to execution tokens improves average ASR-S from 70.4% to 91.9%, reduces the average optimization target length from 88.0 to 9.5 tokens, and reduces convergence rounds from over 1,500 to 441 (Table 7).
- Perturbation budget impact: In retail tasks, average ASR-S is 73.2% at ε=8/255, rises to 93.8% at 16/255, and to 98.9% at 32/255 (Figure 6).
- Multi-step execution failure analysis: Among 265 runs with multi-step execution failures, 43.4% are attributed to authentication/login, 31.7% to popup occlusion, 15.5% to network failures, and only 9.4% to context drift (Table 11).
- Target visual rendering area impact: When the target image's share of the screenshot area increases from 2% to 5% and 10%, the average ASR-S across 5 backbones is 62.8%, 85.3%, and 97.4%, respectively (Table 12).
Negative Results and Exceptions
- In the Home Service scenario, SeeAct's ASR-S is relatively low across models (69.0%–80.1%, Table 2); the authors explain that lists in this scenario typically use smaller thumbnails in dense layouts, reducing visual area, and queries often rely on attribute matching rather than visual identity, weakening the visual grounding signal exploited by the attack.
- In cross-architecture transfer experiments, ASR-S drops substantially (4.5%–23.8%, Table 6), failing to achieve reliable execution-level takeover.
What are some points that can be further explored?
The authors note that full-page mutations were not modeled and that the approach does not apply to coordinate-based agents; future work should explore the effectiveness of defenses under training with randomized identifiers.
Limitations and Future Directions Noted by the Authors
- Arbitrary full-page variation not modeled: The paper notes in Section 4.2 that during recombination, page regions outside the target role slot set remain unchanged, and arbitrary full-page variation is not modeled.
- Cross-architecture transfer cannot achieve reliable control: The paper notes in Section 5.3.3 that cross-model-family transfer changes model confidence but cannot provide reliable execution-level control.
- Defense security under random identifier training remains to be verified: The paper notes in Section 5.5 that training VLMs for grounding and generating random identifiers may restore clean performance, but whether the security benefit persists after such training remains to be explored.
- Promoting defense research at the pipeline execution stage: The paper notes in Section 6 that model-level evaluation underestimates the attack risk that penetrates to the browser execution stage, and it is necessary to inspire new defense methods at this pipeline stage.
- Coordinate-based agents are outside the scope of this study: The paper explicitly states in Appendix C that coordinate-based agents use a different grounding interface and are outside the scope of this study.
- Conservative design of static analysis: The paper notes in Section 4.4 that the data-flow analysis adopts a conservative design prioritizing completeness, so it may retain a few extra tokens while preserving tokens that affect executable commands.
Experimental Coverage
- Agents and models under test: Evaluation covers 4 agent configurations (SeeAct, WebVoyager, and two VisualWebArena variants) and 6 open-weight VLM backbones (LLaVA-v1.5-13B, LLaVA-v1.6-34B, MiniCPM-o-8B, Phi-3-Vision-4B, Qwen2-VL-7B, CogVLM).
- Task scenarios and counts: Evaluation covers 1,710 shopping tasks across 13 real public websites and 540 tasks in the VisualWebArena sandbox, totaling 2,250 tasks.
- Controlled images and budget: Experiments perturb only a single candidate target containing a rendered image, benign candidates remain unchanged, and the default perturbation budget is fixed at ℓ∞ norm 16/255.
- Defenses evaluated: Includes 4 image cleaning settings (JPEG compression, Gaussian blur, uniform noise at two budgets), 3 agent-level defenses (WebSentinel, Consistency Check, WebGuard), and adaptive dynamic identifier randomization.
- Unreported information: The paper does not report the number of random repetitions and variance for multi-round evaluations, does not report the specific execution time of static data-flow analysis, and all test samples are limited to tasks where clean runs succeed.
Summarize the main content of the paper
The paper proposes WebMirage, an end-to-end visual red-teaming framework for web agents, revealing security vulnerabilities from visual grounding to browser execution.
WebMirage is a pipeline-aware end-to-end red-teaming attack framework for visually grounded web agents.
- Core problem: Existing adversarial attacks focus on manipulating model inference or assume fixed context, ignoring candidate reordering caused by webpage dynamics and action post-processing logic, making model-level attacks difficult to translate into actual control at the browser execution layer.
- Method design: Models competition among functionally equivalent elements in renderings through role slot abstraction, simulates peer variation and position shifts through webpage recombination, and uses CodeQL-based static data-flow analysis to precisely constrain optimization targets to the tokens on which action extraction depends.
- Main experimental results:
- Across 2,250 tasks spanning 4 agent configurations and 6 VLM backbones, WebMirage achieves an average ASR-S of 91.9%, far exceeding the strongest baseline Chameleon's 17.4% (Table 1).
- On SeeAct multi-step tasks across 13 websites, it achieves an average ASR-M of 86.9%, with 90.6% of multi-step failures attributed to external environmental obstacles such as popups or login rather than deviation from the attack target (Table 3, Table 11).
- It achieves transfer ASR-S of 81.2%–93.5% within the same model family, but ASR-S drops to 4.5%–23.8% across architectures (Table 6).
- Data-flow analysis supervision reduces optimization target length by 87.4%, improves average ASR-S by 21.5 percentage points, and converges faster than original output optimization (Table 7).
- Defenses and implications: Existing text detection and image cleaning defenses are difficult to prevent hijacking at the visual grounding level; dynamic identifier randomization can suppress attack rate to 11.7% but severely harms normal task performance (accuracy drops to 15.9%). The authors argue that model-level evaluation alone underestimates execution-level attack risk, and agents need to build dedicated defense mechanisms at the action execution stage.
Related papers
- Same-Origin Policy for Agentic BrowsersDefensesarXiv