Are GUI Agents Focused Enough? Automated Distraction via Semantic-level UI Element Injection

2026-04-09Cryptography and Security

Cryptography and SecurityComputation and LanguageComputer Vision and Pattern Recognition
AI summary

The authors studied how graphical user interface (GUI) agents can be tricked in more realistic ways when usual hacking methods don't work. They created a method that adds harmless-looking elements onto screenshots to confuse the agent about where to focus. Their approach, tested on five different models, was much more successful than random attempts and even worked across different models. They also found that once the agent was tricked, it kept being attracted to the fake elements in later tries, showing the method’s lasting effect.

red-teamingGUI agentsadversarial attacksvisual groundingprompt injectionmodular pipelineiterative searchmodel transferabilitysafety alignmentuser interface (UI) elements
Authors
Wenkui Yang, Chao Jin, Haisu Zhu, Weilin Luo, Derek Yuen, Kun Shao, Huaibo Huang, Junxian Duan, Jie Cao, Ran He
Abstract
Existing red-teaming studies on GUI agents have important limitations. Adversarial perturbations typically require white-box access, which is unavailable for commercial systems, while prompt injection is increasingly mitigated by stronger safety alignment. To study robustness under a more practical threat model, we propose Semantic-level UI Element Injection, a red-teaming setting that overlays safety-aligned and harmless UI elements onto screenshots to misdirect the agent's visual grounding. Our method uses a modular Editor-Overlapper-Victim pipeline and an iterative search procedure that samples multiple candidate edits, keeps the best cumulative overlay, and adapts future prompt strategies based on previous failures. Across five victim models, our optimized attacks improve attack success rate by up to 4.4x over random injection on the strongest victims. Moreover, elements optimized on one source model transfer effectively to other target models, indicating model-agnostic vulnerabilities. After the first successful attack, the victim still clicks the attacker-controlled element in more than 15% of later independent trials, versus below 1% for random injection, showing that the injected element acts as a persistent attractor rather than simple visual clutter.