In-Context Defense in Computer Agents: An Empirical Study
On the map: Multimodal LLMs / vision-language models → MLLM jailbreaks and adversarial robustness
also in 1 more
Abstract (arXiv)
Computer agents powered by vision-language models (VLMs) have significantly advanced human-computer interaction, enabling users to perform complex tasks through natural language instructions. However, these agents are vulnerable to context deception attacks, an emerging threat where adversaries embed misleading content into the agent's operational environment, such as a pop-up window containing deceptive instructions. Existing defenses, such as instructing agents to ignore deceptive elements, have proven largely ineffective. As the first systematic study on protecting computer agents, we introduce textbf{in-context defense}, leveraging in-context learning and chain-of-thought (CoT) reasoning to counter such attacks. Our approach involves augmenting the agent's context with a small set of carefully curated exemplars containing both malicious environments and corresponding defensive responses. These exemplars guide the agent to first perform explicit defensive reasoning before action planning, reducing susceptibility to deceptive attacks. Experiments demonstrate the effectiveness of our method, reducing attack success rates by 91.2% on pop-up window attacks, 74.6% on average on environment injection attacks, while achieving 100% successful defenses against distracting advertisements. Our findings highlight that (1) defensive reasoning must precede action planning for optimal performance, and (2) a minimal number of exemplars (fewer than three) is sufficient to induce an agent's defensive behavior.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in MLLM jailbreaks and adversarial robustness, one of 16 directions in Multimodal LLMs / vision-language models. Builds on 22 of its 32 references that are in the map. First posted on arXiv 12 Mar 2025.
Builds on
22 of 32 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2023CogAgent: A Visual Language Model for GUI Agentscited by 692
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2024SeeClick: Harnessing GUI Grounding for Advanced Visual GUI Agentscited by 553
- 2024GPT-4V(ision) is a Generalist Web Agent, if Groundedcited by 547
- 2024Navigating the Digital World as Humans Do: Universal Visual Grounding for GUI Agentscited by 373
- 2023Set-of-Mark Prompting Unleashes Extraordinary Visual Grounding in GPT-4Vcited by 291
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 226
10 more
- 2023GPT-4V in Wonderland: Large Multimodal Models for Zero-Shot Smartphone GUI Navigationcited by 137
- 2024Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agentscited by 135
- 2024Dissecting Adversarial Robustness of Multimodal LM Agentscited by 118
- 2024Attacking Vision-Language Computer Agents via Pop-upscited by 112
- 2024Efficient Adversarial Training in LLMs with Continuous Attackscited by 104
- 2024The Dawn of GUI Agent: A Preliminary Case Study with Claude 3.5 Computer Usecited by 62
- 2024AdvAgent: Controllable Blackbox Red-teaming on Web Agentscited by 57
- 2024MMInA: Benchmarking Multihop Multimodal Internet Agentscited by 55
- 2024Caution for the Environment: Multimodal LLM Agents are Susceptible to Environmental Distractionscited by 55
- 2024AdaptAgent: Adapting Multimodal Web Agents with Few-Shot Learning from Human Demonstrationscited by 19
Built on by
Citing papers per year: 2025: 4; 2026: 4.
8 papers.
- 2025OS-Harm: A Benchmark for Measuring Safety of Computer Use Agentscited by 104
- 2025macOSWorld: A Multilingual Interactive Benchmark for GUI Agentscited by 31
- 2026CaMeLs Can Use Computers Too: System-level Security for Computer Use Agentscited by 15
- 2025LaSM: Layer-wise Scaling Mechanism for Defending Pop-up Attack on GUI Agentscited by 6
- 2026Mind the Gap: Action Rebinding Attacks against Android GUI Agentscited by 6
- 2026Prismata: Confining Cross-Site Prompt Injection in Web Agentscited by 1
- 2025Mind the Gap: Evaluating Model- and Agentic-Level Vulnerabilities in LLMs with Action Graphscited by 0
- 2026Securing Computer-Use Agents: A Unified Architecture-Lifecycle Framework for Deployment-Grounded Reliabilitycited by 0
- 2026Prismata: Confining Cross-Site Prompt Injection in Web Agents9 Jul 2026
- 2026Securing Computer-Use Agents: A Unified Architecture-Lifecycle Framework for Deployment-Grounded Reliability8 May 2026
- 2026Mind the Gap: Action Rebinding Attacks against Android GUI Agents18 Jan 2026
- 2026CaMeLs Can Use Computers Too: System-level Security for Computer Use Agents14 Jan 2026
- 2025Mind the Gap: Evaluating Model- and Agentic-Level Vulnerabilities in LLMs with Action Graphs5 Sep 2025
- 2025LaSM: Layer-wise Scaling Mechanism for Defending Pop-up Attack on GUI Agents13 Jul 2025
- 2025OS-Harm: A Benchmark for Measuring Safety of Computer Use Agents17 Jun 2025
- 2025macOSWorld: A Multilingual Interactive Benchmark for GUI Agents4 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2025Context manipulation attacks : Web agents are susceptible to corrupted memory
- 2026Architecting Secure AI Agents: Perspectives on System-Level Defenses Against Indirect Prompt Injection Attacks
- 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis
- 2026Don't Click That: Teaching Web Agents to Resist Deceptive Interfaces
- 2026BraveGuard: From Open-World Threats to Safer Computer-Use Agents
- 2025EVA: Evolving Semantic Adversaries for Red-Teaming GUI Agents Against Environmental Injection Attacks
- 2026ARGUS: Defending LLM Agents Against Context-Aware Prompt Injection
- 2026Spider-Sense: Intrinsic Risk Sensing for Efficient Agent Defense with Hierarchical Adaptive Screening