Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2025-59834 — adb-mcp

CRITICALFix: srmorete/adb-mcp@041729c

CVE-2025-59834 is a critical-severity (CVSS 9.8) CWE-77 vulnerability in adb-mcp. No vendor fix is recorded yet; mitigation options are listed below.

Command Injection in adb-mcp MCP Server

Also known asGHSA-54j7-grvr-9xwg
Published
Sep 25, 2025
Updated
Aug 12, 2026
Affected
1 pkg
Patched
See advisory
Exploits
None indexed
Exploitation data as of Sep 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-59834.

EPSS Exploitation Probability

via FIRST.org ↗
2.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs84th percentile — riskier than 84% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2025-59834 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

adb-mcpnpm
67downloads / week

Description

Command Injection in adb-mcp MCP Server

The MCP Server at https://github.com/srmorete/adb-mcp is written in a way that is vulnerable to command injection vulnerability attacks as part of some of its MCP Server tool definition and implementation.

The MCP Server is also published publicly to npm at www.npmjs.com/package/adb-mcp and allows users to install it.

Vulnerable tool

The MCP Server defines the function executeAdbCommand() which executes commands via string as a parameter and wraps the promise-based exec function.

The MCP Server then exposes the tool inspect_ui which relies on Node.js child process API exec (through the function wrapper) to execute the Android debugging command (adb). Relying on exec is an unsafe and vulnerable API if concatenated with untrusted user input.

Data flows from the tool definition here which takes in args.device and calls execPromise() in this definitino that uses exec in an insecure way.

Vulnerable line of code: https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L352

// Add adb UI dump tool
server.tool(
  "inspect_ui",
  AdbUidumpSchema.shape,
  async (args: z.infer<typeof AdbUidumpSchema>, _extra: RequestHandlerExtra) => {
    log(LogLevel.INFO, "Dumping UI hierarchy");
    
    const deviceArg = formatDeviceArg(args.device);
    const tempFilePath = createTempFilePath("adb-mcp", "window_dump.xml");
    const remotePath = args.outputPath || "/sdcard/window_dump.xml";
    
    try {
      // Dump UI hierarchy on device
      const dumpCommand = `adb ${deviceArg}shell uiautomator dump ${remotePath}`;
      await execPromise(dumpCommand);
      
      // Pull the UI dump from the device
      const pullCommand = `adb ${deviceArg}pull ${remotePath} ${tempFilePath}`;
      await execPromise(pullCommand);
      
      // Clean up the remote file
      await execPromise(`adb ${deviceArg}shell rm ${remotePath}`);

The argument to the tool, AdbDevicesSchema, is a Zod inferred type defined in the src/types.ts file in the project:

export const inspectUiInputSchema = {
  device: z.string().optional().describe("Specific device ID (optional)"),
  outputPath: z.string().optional().describe("Custom output path on device (default: /sdcard/window_dump.xml)"),
  asBase64: z.boolean().optional().default(false).describe("Return XML content as base64 (default: false)")
};

and exposes device as a string which is an open way to trick the LLM into pushing arbitrary strings into it and hence achieve the command injection exploitation.

Exploitation

When LLMs are tricked through prompt injection (and other techniques and attack vectors) to call the tool with input that uses special shell characters such as ; rm -rf /tmp;# (be careful actually executing this payload) and other payload variations, the full command-line text will be interepted by the shell and result in other commands except of ps executing on the host running the MCP Server.

Reference example from prior security research on this topic, demonstrating how a similarly vulnerable MCP Server connected to Cursor is abused with prompt injection to bypass the developer's intended command:

Cursor defined MCP Server vulnerable to command injection

Impact

User initiated and remote command injection on a running MCP Server.

Recommendation

  • Don't use exec. Use execFile instead, which pins the command and provides the arguments as array elements.
  • If the user input is not a command-line flag, use the -- notation to terminate command and command-line flag, and indicate that the text after the -- double dash notation is benign value.

References and Prior work

  1. Command Injection in codehooks-mcp-server MCP Server project https://www.nodejs-security.com/blog/command-injection-vulnerability-codehooks-mcp-server-security-analysis identified as CVE-2025-53100
  2. Command Injection in ios-simulator-mcp-server MCP Server project https://www.nodejs-security.com/blog/ios-simulator-mcp-server-command-injection-vulnerability identified as CVE-2025-52573
  3. Liran's Node.js Secure Coding: Defending Against Command Injection Vulnerabilities

Credit

Disclosed by Liran Tal

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
📦npmadb-mcpall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for adb-mcp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    No patched version of adb-mcp has shipped for CVE-2025-59834 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-59834 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2025-59834. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# Command Injection in adb-mcp MCP Server The MCP Server at https://github.com/srmorete/adb-mcp is written in a way that is vulnerable to command injection vulnerability attacks as part of some of its MCP Server tool definition and implementation. The MCP Server is also published publicly to npm at www.npmjs.com/package/adb-mcp and allows users to install it. ## Vulnerable tool The MCP Server defines the function `executeAdbCommand()` which executes commands via string as a parameter and wraps the promise-based `exec` function. The MCP Server then exposes the tool `inspect_ui` which relie
O3 Security · Impact-Aware SCA

Is CVE-2025-59834 in your dependencies?

O3 Security finds CVE-2025-59834 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2025-59834: adb-mcp (Critical 9.8) | O3 Security