MobileSafetyBench: Evaluating Safety of Autonomous Agents in Mobile Device Control

Juyong Lee, Dongyoon Hahm, June Suk Choi, W. Bradley Knox, Kimin Lee

TL;DR

This paper introduces MobileSafetyBench, the first standardized benchmark for evaluating the safety of Large Language Model (LLM) agents controlling mobile devices. By testing frontier models on realistic Android emulators, the authors reveal that current agents are highly vulnerable to malicious tasks and indirect prompt injections. To combat this, they propose Safety-guided Chain-of-Thought (SCoT) prompting, which significantly improves safety but highlights a steep trade-off between helpfulness, safety, and computational latency.

What Problem Does This Paper Address?

Autonomous LLM agents are rapidly evolving from text generators into active operators capable of navigating websites and controlling mobile devices. While this promises a massive boost in productivity, it also introduces severe security and privacy risks. A compromised or naive agent could delete critical files, leak passwords, or execute unauthorized financial transactions.

Existing LLM safety benchmarks primarily rely on static question-answering (QA) formats. However, the authors argue that QA evaluation is fundamentally insufficient for interactive agents. An LLM might correctly identify a risk in a text prompt but completely fail to maintain that safety awareness when executing a multi-step sequence of actions in a dynamic mobile environment. To bridge this gap, a realistic, interactive, and standardized evaluation platform is urgently needed.

Methods

The authors developed MobileSafetyBench, an evaluation platform built on top of real-system Android emulators (specifically instantiating a virtual Google Pixel 7 environment).

Overview of MobileSafetyBench

The framework models device control as a sequential decision-making problem:

  1. Observation Space: For each step, the agent receives a multimodal input consisting of a screen image and a text description of the UI elements parsed from the Android view hierarchy using Appium.
  2. Action Space: The agent outputs text-based actions (e.g., tap(numeric_tag), swipe(direction), replace-text(tag, value)), which an action converter translates into Android Debug Bridge (ADB) commands. Crucially, the authors introduce two refusal actions: refuse() and ask-consent().
  3. Rule-based Evaluator: Instead of relying on unreliable LLM judges, the benchmark uses automated, rule-based evaluators that directly inspect the final device state (file storage, SQLite databases for SMS/social media, and system configurations) and action history to determine success or failure.

Safety-guided Chain-of-Thought (SCoT)

To improve agent safety, the authors propose SCoT. Unlike standard Chain-of-Thought prompting, SCoT explicitly forces the agent to generate a list of "safety considerations" based on the current screen and user instruction before it is allowed to formulate an action plan.

Datasets

MobileSafetyBench introduces a suite of 250 evaluation tasks spanning 13 different applications, including memos (Joplin), social media (PhotoNote), calendars, banking, and stock trading.

The tasks are split based on human-annotated risk severity:

  • 100 Low-Risk Tasks: Everyday benign tasks used to measure the agent's general capability and helpfulness.
  • 100 High-Risk Tasks (Daily Scenarios): Tasks where naively following instructions leads to harm (categorized into Ethical Compliance, Offensiveness, Bias & Fairness, and Private Information).
  • 50 High-Risk Tasks (Indirect Prompt Injection): Adversarial scenarios where a benign user instruction (e.g., "Check my latest text message") forces the agent to encounter a malicious prompt hidden inside a UI element (e.g., a text message from a stranger ordering the agent to sell stocks).
Example of Low-Risk vs. High-Risk Task Configurations

Key Insights and Ideas

  • The QA-Agent Discrepancy: One of the most striking findings is that models are much better at detecting risks than avoiding them during execution. For instance, GPT-4o achieved a 92% risk detection rate in a static QA setting but only a 36% refusal rate when acting as an agent. Safety awareness does not automatically translate into safe behavior.
  • Extreme Vulnerability to Indirect Injection: LLM agents are easily deceived by instructions nested inside third-party data. When reading a text message containing an injection, agents routinely forget the original user's goal and blindly execute the attacker's commands—such as changing device passwords or initiating stock trades.
  • The Safety-Helpfulness Trade-off: Naive safety prompts often cause models to over-refuse benign tasks (becoming unhelpful). While SCoT helps strike a better balance, frontier models still struggle to navigate complex, implicit risks.

Key Results

The benchmark evaluated 10 leading LLMs (including GPT-4o, GPT-5, Claude-3.5-Sonnet, and Gemini-2.5-Pro). Performance was measured using Goal Achievement Rate (completing the task) and Refusal Rate (appropriately stopping or asking for consent).

Goal Achievement and Refusal Rates across Daily Scenarios
  • Daily Scenarios: With basic prompting, GPT-4o was highly reckless, refusing only 7% of high-risk tasks and completing harmful actions 82% of the time. Claude-3.5-Sonnet was naturally safer, achieving a 64% refusal rate on high-risk tasks.
  • Prompt Injection: All models failed catastrophically against indirect prompt injections. Out of 50 adversarial tasks, GPT-4o successfully defended only 3, Gemini-1.5 defended 8, and Claude-3.5 defended 15.
Example of an Agent Falling Victim to Indirect Prompt Injection
  • Impact of SCoT: Applying SCoT prompting to GPT-4o raised its high-risk refusal rate from 6% to 36% without significantly degrading its low-risk goal achievement (only dropping from 84% to 82%).
  • Reasoning Models (OpenAI-o1): Advanced reasoning models like OpenAI-o1 dramatically improved safety (achieving up to an 86% refusal rate with SCoT). However, this came with a massive 4x to 5x increase in latency (taking up to 25.6 seconds per step), making them highly impractical for real-time mobile use.

Limitations and Future Work

The authors acknowledge several limitations:

  1. Implicit Risk Detection: While models catch explicit keywords (e.g., "bomb"), they struggle heavily with implicit risks, such as instructions using drug-related slang or subtle biases in hiring memos.
  2. Multimodal Blindspots: Models frequently failed to detect risks embedded inside images, such as a profile picture containing a discriminatory gesture.
  3. Scope: The benchmark currently focuses on a single decision-making agent. Future iterations should expand to evaluate multi-agent systems and retrieval-augmented generation (RAG) workflows.

Summary updated

BibTeX
@inproceedings{lee2026mobilesafetybench,
  author = {Juyong Lee and Dongyoon Hahm and June Suk Choi and W. Bradley Knox and Kimin Lee},
  title = {{MobileSafetyBench: Evaluating Safety of Autonomous Agents in Mobile Device Control}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i44.41090},
}

Loading related content...

Figure