Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105793 Overview
Microsoft UFO is an open-source framework for intelligent automation across devices and platforms. CVE-2026-105793 is an authenticated command injection vulnerability in the press_key tool of the Mobile Model Context Protocol (MCP) server. The flaw resides in ufo/client/mcp/http_servers/mobile_mcp_server.py, which accepts a free-form key_code parameter and forwards it to adb shell input keyevent. Because the Android Debug Bridge (ADB) client joins arguments into a remote command string that the Android shell reparses, an authenticated caller can execute arbitrary commands as the Android shell user on a connected authorized device. The issue is fixed in UFO version 3.0.9.
Critical Impact
An authenticated Mobile MCP caller holding a valid UFO_MCP_API_KEY can execute arbitrary shell commands on any authorized connected Android device under the shell user context.
Affected Products
- Microsoft UFO versions prior to 3.0.9
- ufo/client/mcp/http_servers/mobile_mcp_server.py (Mobile MCP HTTP server)
- Deployments exposing the UFO Mobile MCP server with ADB access to authorized Android devices
Discovery Timeline
- 2026-10-06 - CVE-2026-105793 published to the National Vulnerability Database (NVD)
- 2026-10-06 - Last updated in NVD database
- Fix released - Microsoft UFO v3.0.9 with patch commit a538791 and GitHub Security Advisory GHSA-5cjx-4375-4877
Technical Details for CVE-2026-105793
Vulnerability Analysis
The vulnerability is an OS command injection flaw [CWE-78] in the Mobile MCP server shipped with Microsoft UFO. The press_key tool is designed to simulate hardware key presses on a connected Android device by invoking adb shell input keyevent <key_code>. The server does not validate or sanitize the key_code argument before passing it to the ADB subprocess call.
An authenticated attacker supplies a crafted key_code value containing shell metacharacters. The ADB client concatenates the arguments into a single remote command string, which sh on the Android device then reparses. This produces execution of attacker-controlled commands under the Android shell user. The impact is bounded: it does not grant host operating system execution, Android root, or privileges beyond the standard shell user.
Root Cause
The root cause is unsafe argument passing to adb shell. Even when subprocess is called with a list of arguments on the host side, adb shell joins the trailing arguments and transmits them as a command string that the device shell reparses. Without input validation, metacharacters such as ;, &&, |, or backticks allow command chaining. The patch introduces the re module in mobile_mcp_server.py to enforce strict validation of the key_code parameter against an allowlist pattern.
Attack Vector
Exploitation requires three preconditions: a valid UFO_MCP_API_KEY, adb installed and reachable on the host, and an authorized Android device connected to that host. The attacker authenticates to the Mobile MCP server and invokes the press_key tool with a key_code value that embeds shell operators. The injected payload executes on the Android device as the shell user, enabling file access, process control, and further reconnaissance within the shell-user privilege boundary.
import base64
import hmac
import os
+import re
import subprocess
import tempfile
import xml.etree.ElementTree as ET
Source: GitHub Commit a538791 — the patch imports Python's re module to introduce regex-based input validation on the key_code parameter before it reaches the ADB subprocess invocation.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-105793
Indicators of Compromise
- Unexpected adb shell child processes spawned by the UFO Mobile MCP server with payloads containing shell metacharacters (;, &&, |, $(), backticks) in the keyevent arguments.
- Android device logs (logcat) showing shell commands executed outside the expected input keyevent activity window.
- Mobile MCP HTTP access logs showing authenticated press_key tool invocations with non-numeric or oversized key_code values.
Detection Strategies
- Monitor process creation on hosts running the UFO Mobile MCP server for adb invocations whose command line contains shell operators adjacent to input keyevent.
- Parse Mobile MCP request bodies and alert when the key_code field deviates from the expected Android KeyEvent constant set (integer codes or KEYCODE_* identifiers).
- Correlate UFO_MCP_API_KEY authentication events with downstream ADB command execution on connected devices to surface anomalous command patterns.
Monitoring Recommendations
- Enable verbose ADB server logging and forward it alongside Mobile MCP server logs to a centralized analytics pipeline.
- Baseline normal press_key traffic volume and payload shape; alert on deviations such as string arguments, multi-byte payloads, or repeated failed invocations.
- Audit issuance and distribution of UFO_MCP_API_KEY values and rotate any keys suspected of exposure.
How to Mitigate CVE-2026-105793
Immediate Actions Required
- Upgrade Microsoft UFO to version 3.0.9 or later, which validates the key_code parameter before invoking adb shell.
- Rotate every active UFO_MCP_API_KEY and restrict issuance to trusted automation identities only.
- Restrict network reachability of the Mobile MCP HTTP server to localhost or an authenticated internal management network.
- Inventory connected authorized Android devices and review their recent activity for signs of unauthorized shell execution.
Patch Information
The fix is published in Microsoft UFO v3.0.9 via commit a538791. The patch adds regex-based validation of the key_code parameter in ufo/client/mcp/http_servers/mobile_mcp_server.py so that only well-formed Android keyevent identifiers reach the ADB subprocess call. Full remediation details are described in GitHub Security Advisory GHSA-5cjx-4375-4877.
Workarounds
- Disable or remove the Mobile MCP HTTP server if mobile automation is not required in the deployment.
- Place an upstream proxy or WAF rule that rejects press_key requests whose key_code field contains any non-alphanumeric or non-underscore character.
- Revoke ADB authorization on connected Android devices until the host has been upgraded to UFO 3.0.9.
# Upgrade Microsoft UFO to the patched release
pip install --upgrade "ufo>=3.0.9"
# Verify the installed version
python -c "import ufo; print(ufo.__version__)"
# Rotate the Mobile MCP API key used by clients
export UFO_MCP_API_KEY="$(openssl rand -hex 32)"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

