MIRAGE: Stealthy Visual Prompt Injection for Vulnerability Detection in Web Agents
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Today's paper: "MIRAGE: Stealthy Visual Prompt Injection for Vulnerability Detection in Web Agents".
Jane: The gist The proposed MIRAGE framework introduces a novel visual indirect prompt injection framework for targeted next-action hijacking in screenshot-based web agents under strict spatial constraints,
Tom: First, who's behind it and why it matters.
Title and authors: Tom: So we’re talking about MIRAGE today. The title is "MIRAGE: Stealthy Visual Prompt Injection for Vulnerability Detection in Web Agents". It sounds like they are tackling a specific kind of security problem with AI agents.
Jane: Right, it’s not just any agent vulnerability; it focuses on a very specific scenario where an attacker only controls a small piece of the webpage, like an ad slot or a widget. That’s the core idea here.
Lu: Basically, they are looking at how to make those agents do something different than intended by injecting visual prompts into that allowed region. It’s about steering the agent toward a specific next action without making it obviously suspicious on the whole page.
Meng: So, what does this mean for us in production? It sounds like they’re moving past just testing general vulnerabilities and focusing on very realistic, bounded attacks under strict spatial constraints.
Lalam: It’s about targeting the agent’s next action by manipulating only a localized visual area while keeping everything else on the page intact, which makes it harder to spot.
The paper's summary: Tom: They propose this whole framework called MIRAGE. It’s described as a masked, diffusion-guided visual prompt injection framework. It uses diffusion models to generate content inside that allowed region in a way that is visually natural looking, not just some noisy overlay.
Jane: That sounds tricky because the main challenge they identified is keeping the injected content visually plausible while still achieving the specific goal of steering the agent toward a certain action. They call this global evasion via a local attention collapse strategy.
Lu: They achieve this by creating a fully differentiable compositing pipeline that optimizes both pixel-level residual perturbations and semantic-level latent manipulations simultaneously. This is how they manage the trade-off between looking real and achieving the hijack effect.
Meng: So, it’s not just one type of attack; it’s combining semantic changes with pixel adjustments to make sure the agent gets steered correctly, rather than just causing a distraction.
Lalam: The summary points out that they formulate an adversarial optimization problem over a localized diffusion generation process, which is how they operationalize this injection technique. It’s about generating the right visual input for the right goal.
The paper's improvements: Tom: They detail several key components in MIRAGE. One is semantic-level latent manipulation, where they use a partial forward diffusion process to modify the image at a specific timestep, say τ = zero point three.
Jane: And then they use reverse sampling guided by the MLLM task loss to refine that latent update, and they introduce something called an Enhanced DDIM Curvature Objective for that.
Lu: That objective is designed to drive the sampling trajectory into areas that are out of distribution relative to what a normal agent would do, which is key for targeted action control. The latent update formula involves zˆt−one = zt−one − η∇zt(Ltask(zt, yˆ) − λ1Lcurve) <ref:2606.20717#pg2>.
Meng: From an engineering standpoint, the synergistic dark-pixel residual perturbation and compositing pipeline is interesting because they restrict the pixel-level noise to only the dark pixels of the visual context defined by Mdark.
Lalam: That means they compute a composite input xˆ with Eq. fifteen by injecting a sparse residual perturbation δ, which is restricted to those dark pixels, making the attack more stealthy visually.
Conclusion: Tom: So to wrap up this paper on MIRAGE, it shows how you can balance human-imperceptible stealth with actual adversarial efficacy in these bounded regions. They achieved state-of-the-art performance on datasets like Mind2Web, getting scores of ninety-five point seven for SeeAct and ninety-eight point three for OpenClaw.
Jane: The main implication here is that we can now consider real-world scenarios where trusted platforms have limited visual control as a threat model, not just theoretical setups with full access to the page.
Lu: It pushes the research toward refining how we handle diffusion sampling to reduce the need for those pixel-level adjustments later on. They also plan to simulate diverse patch segmentation strategies to make it more transferable.
Meng: The limitation they admit is that MIRAGE currently assumes white-box access to the target model's gradients, which limits its effectiveness against closed-source agents. Also, there’s the computational overhead from using iterative PGD for those sparse pixel perturbations.
Lalam: Yes, and they also noted that future work will focus on refining the adversarial diffusion sampling process to reduce those pixel-level adjustments and enhance transferability across different agent setups. The paper is MIRAGE: Stealthy Visual Prompt Injection for Vulnerability Detection in Web Agents, and that’s where we leave it for now.
Sdu University
cs.CV, cs.AI, cs.CR
Submitted: 2026-06-16
Updated: 2026-10-15
Code: https://github.com/browser-use/browser-use
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 86/100
The gist: The gist The proposed MIRAGE framework introduces a novel visual indirect prompt injection framework for targeted next-action hijacking in screenshot-based web agents under strict spatial
Key concepts
- Multimodal Large Language Model (MLLM) Web Agents
- These are AI programs that operate directly on webpages by looking at screenshots and predicting what the user should click or do next. They use both visual input (the screen) and language understanding to complete tasks, making them a new target for security attacks.
- Visual Indirect Prompt Injection
- This is a method where an attacker modifies only a small, specific part of the webpage—like an ad slot—to trick the agent. Instead of injecting text directly into the main prompt, MIRAGE injects visual information that subtly steers the agent's decision-making process toward a desired action.
- Diffusion Models for Adversarial Generation
- Diffusion models are AI tools used here to create new images that look real but have specific, controlled modifications. MIRAGE uses these models to generate adversarial patches that are perceptually safe (look normal) while containing the necessary visual changes for the attack.
- Curvature-Aware Adversarial Diffusion Guidance
- This is a sophisticated technique used during image generation to guide the diffusion process toward specific, desired outcomes. It helps ensure that the generated adversarial images are not just random noise but are shaped precisely to maximize their effect on the agent's subsequent action prediction.
Terminology
Summary
The gist The proposed MIRAGE framework introduces a novel visual indirect prompt injection framework for targeted next-action hijacking in screenshot-based web agents under strict spatial constraints, demonstrating high efficacy and stealth.
Problem and Threat Model
Multimodal large language models (MLLMs) enable web agents that operate directly on rendered webpages by observing screenshots and predicting the next action required to complete a user task At the same time, it introduces a new security boundary: visual content rendered on a webpage is not merely shown to the user, but also becomes part of the agent’s decision-making context A particularly realistic risk arises when the website itself is trusted, but some bounded regions of the page are supplied by third parties This raises a practical security question: Can an adversary who controls only a legitimate bounded visual region steer a web agent toward an attacker-chosen next action Existing attacks on web agents do not fully capture this setting
MIRAGE Framework and Methodology
To overcome these challenges, the authors introduce MIRAGE (Masked Injection via Residual And Generative Exploitation), a masked, diffusion-guided visual prompt injection framework The method operationalizes a global evasion via Local Attention Collapse strategy to achieve high attack efficacy under severe spatial constraints This approach integrates a fully differentiable compositing pipeline that jointly optimizes pixel-level residual perturbations and semantic-level latent manipulations The framework executes visual prompt injection by formulating an adversarial optimization problem over a localized diffusion generation process
Key Components of MIRAGE
The attack pipeline involves several sophisticated components designed to ensure both semantic manipulation and visual plausibility
-
Semantic-level Latent Manipulation: The method leverages the reverse diffusion process to modify the image at the semantic level This involves using a partial forward diffusion process, injecting controlled Gaussian noise up to a specific timestep τT, where τ = 0.3
-
Reverse Sampling via DDIM Trajectory: The reverse sampling process is initialized from zT and iteratively refined using the gradient of the MLLM task loss To enhance targeted action control, an Enhanced DDIM Curvature Objective is introduced to drive the sampling trajectory into out-ofdistribution areas The latent update is guided by zˆt−1 = zt−1 − η∇zt(Ltask(zt, yˆ) − λ1Lcurve)
-
Synergistic Dark-Pixel Residual Perturbation and Compositing: A fully differentiable compositing pipeline is used to compute the composite input xˆ with Eq. 15 This involves injecting a sparse residual perturbation δ, which is restricted to the dark pixels of the visual context defined by Mdark The final composite adversarial patch pˆ is computed as pˆ = pbase + Mdark ⊙ δ
Evaluation and Results
Extensive experiments were conducted against prominent MLLM web agent frameworks, specifically SeeAct and OpenClaw The evaluation utilized the realworld Mind2Web dataset, filtering for tasks requiring CLICK or SELECT actions MIRAGE achieved state-of-the-art performance, consistently outperforming existing baselines on the real-world dataset across various MLLM architectures Table 1 shows that MIRAGE achieves an ASR of 95.7 for SeeAct and 98.3 for OpenClaw The results demonstrate that the synergistic combination of semantic-level and pixel-level perturbations manipulates the MLLM’s attention far more effectively than gradient-based noise alone
Limitations and Future Work
While MIRAGE achieves state-of-the-art performance under a practical threat model, several limitations remain to be addressed First, the framework incurs computational overhead due to the reliance on iterative PGD for sparse pixel-level perturbations Second, MIRAGE currently assumes white-box access to the target model’s gradients, which restrains its effectiveness against closedsource MLLMs Future work will focus on refining the adversarial diffusion sampling process to reduce the necessity of these pixel-level adjustments Additionally, the authors plan to enhance the transferability of MIRAGE to broader settings by simulating diverse MLLM patch segmentation strategies
Conclusion
Our proposed method achieves a highly effective balance between human-imperceptible stealth and adversarial efficacy, extending the applicability of these attacks to legitimate, bounded regions within trusted web platforms This combination of trusted-platform assumptions, bounded visual control, diffusion-guided synthesis, and action-level evaluation defines the gap addressed by our method MIRAGE provides a practical visual prompt injection framework under the malicious third-party threat model The findings contribute to the advancement of multimodal web agent security and provide valuable insights into achieving global attention collapse via localized visual manipulation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents powered by open-source MLLMs Given the growing adoption of generalist web agents such as OpenClaw, these localized visual prompt injections pose a significant security threat to end-users Therefore, users should implement a human-in-the-loop verification mechanism, explicitly authorizing critical agent actions rather than relying on fully unsupervised web automation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents powered by open-source MLLMs Given the growing adoption of generalist web agents such as OpenClaw, these localized visual prompt injections pose a significant security threat to end-users Therefore, users should implement a human-in-the-loop verification mechanism, explicitly authorizing critical agent actions rather than relying on fully unsupervised web automation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents powered by open-source MLLMs Given the growing adoption of generalist web agents such as OpenClaw, these localized visual prompt injections pose a significant security threat to end-users Therefore, users should implement a human-in-the-loop verification mechanism, explicitly authorizing critical agent actions rather than relying on fully unsupervised web automation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents powered by open-source MLLMs Given the growing adoption of generalist web agents such as OpenClaw, these localized visual prompt injections pose a significant security threat to end-users Therefore, users should implement a human-in-the-loop verification mechanism, explicitly authorizing critical agent actions rather than relying on fully unsupervised web automation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents powered by open-source MLLMs Given the growing adoption of generalist web agents such as OpenClaw, these localized visual prompt injections pose a significant security threat to end-users Therefore, users should implement a human-in-the-loop verification mechanism, explicitly authorizing critical agent actions rather than relying on fully unsupervised web automation MIRAGE could potentially be exploited by adversaries to manipulate commercial traffic and illicitly generate profit on trusted websites by hijacking web agents
Improvements for AI systems
-
The improved system can perform targeted next-action hijacking on trusted web platforms by exploiting semantically legitimate, spatially constrained regions controlled by a third party, as described in
MIRAGE: Stealthy Visual Prompt Injection for Vulnerability Detection in Web Agents.
This is achieved by leveraginga masked diffusion-guided visual prompt injection framework
that combinesdiffusion-constrained visual synthesis with sparse dark-pixel residual perturbations for targeted next-action hijacking under strict spatial constraints.
-
The system can achieve high attack efficacy while maintaining visual stealth by employing a synergistic combination of semantic and pixel-level perturbations, which the paper states
manipulates the MLLM’s attention far more effectively than gradient-based noise alone.
This allows for attacks that aresignificantly higher realism
compared to methods likeWebInject,
which usesfull-screen gradient-based noise.
-
The system can steer web agents to execute specific, attacker-chosen actions by optimizing the diffusion latent under a loss function that balances task success with visual fidelity, as detailed by the objective:
zˆt−1 = zt−1 − η∇zt(Ltask(zt, yˆ) − λ1Lcurve).
This ensures the generated content aligns withthe attacker’s objectives
while avoiding convergence to suboptimal local minima. -
The system can generate adversarial patches that are robust against detection by restricting pixel-level perturbations
to regions that are inherently less sensitive to human visual perception: the dark pixels of the visual context,
as defined by isolating pixels based on their relative luminance and constructing aboolean mask Mdark to restrict the perturbation strictly to the darkest 30% of these valid pixels.
Sources
- Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAs
- MIP against Agent: Malicious Image Patches Hijacking Multimodal OS Agents
- Qwen2.5-VL Technical Report
- Image Hijacks: Adversarial Images can Control Generative Models at Runtime
- Diffusion Models for Imperceptible and Transferable Adversarial Attack
- The Llama 3 Herd of Models
- Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
- CogAgent: A Visual Language Model for GUI Agents
- Visual Adversarial Examples Jailbreak Aligned Large Language Models
- OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments
- AdInject: Real-World Black-Box Attacks on Web Agents via Advertising Delivery
- AdvAgent: Controllable Blackbox Red-teaming on Web Agents
- Diffusion-Based Adversarial Sample Generation for Improved Stealthiness and Controllability
- GPT-4V(ision) is a Generalist Web Agent, if Grounded
Related papers
- Loss Knows Best: Detecting Annotation Errors in Videos via Loss Trajectories
- AnchorWeave: World-Consistent Video Generation with Retrieved Local Spatial Memories
- Benchmarking the Robustness of Foundation Models for Mammography under Domain Shift
- MambaX-Net: Dual-Input Mamba-Enhanced Cross-Attention Network for Longitudinal MRI Segmentation
- TeleOCR: Navigating Document Parsing Across Digital and Camera-Captured Documents
- A Survey on Efficient Vision-Language-Action Models