arXiv:2609.09212cs.CRSep 2026

Manuscript Offprint

arXiv:2609.09212

AgentHijack: Visual Patch Attacks on Multimodal Computer-Use Agents

Zhihao Liu, Hongyu Sun, Zhiyuan Fu, Xiaonan Duan, Jice Wang, Shangru Zhao, Weizhi Meng, Wuxin Yang, Yangfan Zhou, Yuqing Zhang

Zhihao Liu 1^{1}, Hongyu Sun 1,∗^{1,*}, Zhiyuan Fu 1,2^{1,2}, Xiaonan Duan 1^{1}, Jice Wang 1^{1}, Shangru Zhao 2^{2}, Weizhi Meng 3^{3}, Wuxin Yang 1^{1}, Yangfan Zhou 1^{1}, Yuqing Zhang 2,∗^{2,*}

1^{1}Hainan University, Hainan 570228, China

2^{2}University of Chinese Academy of Sciences National Computer Network Intrusion Protection Center, Beijing 101408, China

3^{3}School of Computing and Communications, Lancaster University, Lancaster, United Kingdom

Abstract—This paper presents an end-to-end evaluation framework for image-triggered command injection against computer-use agents (CUAs). The goal is to test whether a local visual patch can induce verifiable environmental consequences along the full chain of screenshot input, VLM generation, action parsing, and environment execution. We train and deploy patches on author-controlled GitHub Pages pages and a locally deployed CSDN clone, and evaluate them in real environments across five open-source or publicly available GUI-agent or vision-language-model (VLM) backends. Our experiment aggregates 600 instance-level online cases, with T-ASR, TAPR, and E2E-ASR reaching 84.5%, 47.0%, and 20.3%, respectively. Trajectory analysis further shows that in some successful cases the agent first executes a malicious terminal command and then continues the original benign task. These results indicate that optimized local visual signals can affect not only VLM outputs but also propagate through the execution pipeline of open CUAs and create real environmental risk.

Index Terms—computer-use agents, multimodal security, visual prompt injection, adversarial patch, agentic systems

1. Introduction

Computer-use agents have rapidly evolved from interface understanding to interface execution. Earlier web-interaction environments and recent visual or desktop benchmarks show that agents increasingly convert screenshots, web pages, and natural-language tasks into browser, mouse, keyboard, or terminal actions [1], [2], [3], [4]. Mobile and screen-centric systems further extend this interaction paradigm beyond desktop-only settings [5], [6], [7]. In such systems, VLM errors no longer stop at the response layer. They can propagate through action parsing and environment execution and eventually become observable system behavior.

Prior work has already shown that untrusted web content and tool-return values can influence agent decision making through indirect prompt injection and tool-chain contamination [8], [9], [10]. Visible carriers on GUI pages, including fine print, pop-ups, and realistic environmental injections, further show that the interface itself can become an attack surface [11], [12], [13]. Real-world delivery channels and HTML-mediated surfaces extend this risk beyond handcrafted pages [14], [15]. However, the literature still lacks a systematic analysis of whether a trainable image trigger can move beyond output manipulation and survive the later stages of an agent pipeline.

This paper studies a threat setting that is closer to operational risk. Instead of placing explicit malicious text in a visible page region, the attacker deploys a trained local visual patch that induces the agent to execute terminal commands related to confidentiality, integrity, or availability. Compared with conventional image attacks, the goal is not misclassification or descriptive drift. Compared with general prompt injection, the carrier is not explicit natural language. The key question is whether an optimized visual signal can force the VLM backend to emit an output that is compatible with the agent's action parser and can therefore alter the real environment.

Our central concern is therefore not merely whether a patch can influence VLM output, but whether that influence can cross the interfaces of action parsing and environment execution and ultimately produce verifiable changes in files, configurations, or service states. In other words, the novelty of the setting lies in closed-loop execution risk rather than in output perturbation alone.

To study this problem, we build an end-to-end framework that connects offline patch optimization with online real-environment evaluation. In the first stage, we train a fixed-position local patch on screenshots of author-controlled GitHub Pages pages and a locally deployed CSDN clone. CSDN is a widely used Chinese developer community and technical-blog platform; our local clone simulates this familiar tutorial-style webpage context without interacting with the real service. In the second stage, we deploy the trained patch into web environments visited by the real task workflow and record the full trajectory from screenshot input to VLM generation, action parsing, and environment-state change. We use three layered metrics: T-ASR measures target-string hits, TAPR measures whether the output enters the action space, and E2E-ASR measures whether the intended environment-level consequence actually occurs.

The contributions of this paper are threefold.

Figure

Figure 1. Overview of webpage-deployed visual patch attack under a benign tmux installation task. The patch is presented as ordinary web content, while the agent's nominal task remains benign.

  1. Framework and task construction. We propose an image-triggered command-injection evaluation framework for CUAs and instantiate it with controlled CIA-oriented online tasks over GitHub Pages and a locally deployed CSDN clone.

  2. Layered execution metrics. We separate text hits, parser acceptance, and environment-level success through T-ASR, TAPR, and E2E-ASR, showing why a single ASR-style number is insufficient for characterizing real agent risk.

  3. Real-environment diagnosis. Across 600 online cases and control experiments, we analyze successful and failed trajectories to identify where visually induced attacks are amplified, attenuated, or blocked inside the agent pipeline.

References (45)