Back to skill

Security audit

mobile-agent

Security checks for vulnerabilities and agentic risk

Overview

The skill clearly discloses that it can control a real phone, but it relies on unaudited local server code and a mutable external browser page for high-impact device actions.

Install only if you trust the separate MCP server source and the hosted Mobile AI Agent page. Treat this as granting an agent practical control over your connected phone: watch the session, avoid payment or deletion tasks unless you explicitly approve them, and stop the relay when finished.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:93
Finding

Unauditable Dependency Installation and Mutable Third-Party Device-Control Runtime

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 93–105
Vulnerability Type: Unverified third-party dependencies and externally hosted privileged runtime
Risk Level: High

Vulnerable Code

markdown
### 1. Start the Local MCP Server

```bash
cd <project-root>/mcp-server
npm install      # Install dependencies on first run
npm run build    # Compile TypeScript
npm start        # Start the server (listens on stdio + WebSocket :7788)

2. Open the Mobile AI Agent Page

Navigate to https://mobile-ai-use.xyz/mobileAi — the Relay indicator in the top-right corner of the page header turning green indicates a successful connection.

text

### Technical Analysis

The skill instructs users to install npm dependencies and execute an MCP server, but the audited artifact contains only `SKILL.md`. The referenced `mcp-server` directory, source code, `package.json`, lockfile, and compiled server are not included. The dependency graph, installation scripts, version constraints, integrity metadata, and local relay behavior therefore cannot be audited from the supplied package.

The instructions also delegate phone-control functionality to JavaScript delivered by `https://mobile-ai-use.xyz/mobileAi`. According to the documented architecture, this page communicates with the local MCP relay through a localhost WebSocket and controls the connected device through Web ADB. Because the hosted application is not bundled or pinned to an immutable reviewed version, its effective behavior can change after the skill itself has been reviewed.

No direct evidence establishes that the npm dependencies or hosted application are currently malicious. The vulnerability is the unauditable and mutable supply-chain boundary given privileged access to a physical device.

### Attack Path

1. A user follows the skill instructions and attempts to obtain the separately referenced MCP server.
2. The user runs `npm install` 
...[truncated 1724 chars]
Remediation
View remediation

Remediation Suggestions

  1. Include the complete MCP server source, package.json, and a committed lockfile in the reviewed artifact.
  2. Replace npm install with npm ci so installation strictly follows the committed dependency graph.
  3. Pin all direct and transitive dependencies to reviewed versions and preserve package integrity hashes.
  4. Audit dependency lifecycle scripts and disable unnecessary scripts during installation.
  5. Generate and review a software bill of materials, and continuously scan dependencies for known vulnerabilities and unexpected ownership changes.
  6. Bundle or self-host the browser application using reviewed, versioned, immutable assets instead of relying on mutable code from an external domain.
  7. Authenticate WebSocket clients and enforce a strict origin allowlist so arbitrary websites cannot connect to the localhost relay.
  8. Bind the relay only to the loopback interface and use a unique, short-lived session token for every connection.
  9. Require separate, explicit user authorization immediately before each sensitive action, including messaging, payments, deletion, and settings changes.
  10. Apply least privilege to Web ADB and expose only the minimum operations needed for the requested task.
  11. Provide visible execution logs, action previews, and a reliable emergency-abort control.
  12. Publish reproducible build instructions and signed release artifacts so users can verify that the executed server and browser assets match the reviewed source.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep