{"id":"CVE-2025-59834","revision":null,"records":[{"revision":"898e972f8f774e99aca2d135ab3cae0d","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-59834","aliases":[],"title":"Command Injection in adb-mcp MCP Server","description":"ADB MCP Server is a MCP (Model Context Protocol) server for interacting with Android devices through ADB. In versions 0.1.0 and prior, the MCP Server 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. This issue has been patched via commit 041729c.","state":0,"publishedAt":"2025-09-25T13:41:15.676+00:00","modifiedAt":"2025-09-25T14:36:27.801+00:00","affected":[{"ecosystem":"Vendor product","name":"adb-mcp","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"srmorete\",\n                    \"product\": \"adb-mcp\",\n                    \"versions\": [\n                        {\n                            \"version\": \"<= 0.1.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/srmorete/adb-mcp/security/advisories/GHSA-54j7-grvr-9xwg","https://github.com/srmorete/adb-mcp/commit/041729c0b25432df3199ff71b3163a307cf4c28c","https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L355"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-59834","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-59834","identifiers":["CVE-2025-59834"]},"retained":false,"historicalAffected":[]},{"revision":"12672bbfd392485b94a7b0b638a34fa9","observedAt":"2026-11-09T03:15:54.437+00:00","statement":{"source":"euvd","id":"EUVD-2025-31042","aliases":["CVE-2025-59834","GHSA-54j7-grvr-9xwg"],"title":"ADB MCP Server is a MCP (Model Context Protocol) server for interacting with Android devices through ADB. In versions 0.1.0 and prior, the MCP Server is written in a way that is vulnerable to command injection vulnerability attacks as part …","description":"ADB MCP Server is a MCP (Model Context Protocol) server for interacting with Android devices through ADB. In versions 0.1.0 and prior, the MCP Server 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. This issue has been patched via commit 041729c.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":null}],"references":["https://github.com/srmorete/adb-mcp/security/advisories/GHSA-54j7-grvr-9xwg","https://github.com/srmorete/adb-mcp/commit/041729c0b25432df3199ff71b3163a307cf4c28c","https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L355"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-31042","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 25, 2025, 1:41:15 PM","dateUpdated":"Sep 25, 2025, 2:36:27 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-31042","identifiers":["EUVD-2025-31042","CVE-2025-59834","GHSA-54j7-grvr-9xwg"]},"retained":false,"historicalAffected":[]},{"revision":"d92b7456553e4a82b5d72e3cfac3ccad","observedAt":"2026-10-25T03:17:27.277+00:00","statement":{"source":"nvd","id":"CVE-2025-59834","aliases":[],"title":"ADB MCP Server is a MCP (Model Context Protocol) server for interacting with Android devices through ADB. In versions 0.1.0 and prior, the MCP Server is written in a way that is vulnerable to command injection vulnerability attacks as part …","description":"ADB MCP Server is a MCP (Model Context Protocol) server for interacting with Android devices through ADB. In versions 0.1.0 and prior, the MCP Server 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. This issue has been patched via commit 041729c.","state":0,"publishedAt":"2025-09-25T14:15:46.357+00:00","modifiedAt":"2026-10-11T20:10:00.2+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L355","https://github.com/srmorete/adb-mcp/commit/041729c0b25432df3199ff71b3163a307cf4c28c","https://github.com/srmorete/adb-mcp/security/advisories/GHSA-54j7-grvr-9xwg"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-59834","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-77","CWE-78"],"productCriteria":["cpe:2.3:a:srmorete:adb_mcp_server:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2025-09-25T14:15:46.357","lastModified":"2026-10-11T20:10:00.200"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-59834","identifiers":["CVE-2025-59834"]},"retained":false,"historicalAffected":[]},{"revision":"549e6d18bff24b31873318f8b3d3d610","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-54j7-grvr-9xwg","aliases":["CVE-2025-59834"],"title":"Command Injection in adb-mcp MCP Server","description":"# Command Injection in adb-mcp MCP Server\n\nThe 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.\n\nThe MCP Server is also published publicly to npm at www.npmjs.com/package/adb-mcp and allows users to install it.\n\n## Vulnerable tool\n\nThe MCP Server defines the function `executeAdbCommand()` which executes commands via string as a parameter and wraps the promise-based `exec` function.\n\nThe 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.\n\nData flows from the tool definition [here](https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L343) which takes in `args.device` and calls `execPromise()` in [this definitino](https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L346-L348C13) that uses `exec` in an insecure way.\n\nVulnerable line of code: [https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L352](https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L355)\n\n```js\n// Add adb UI dump tool\nserver.tool(\n  \"inspect_ui\",\n  AdbUidumpSchema.shape,\n  async (args: z.infer<typeof AdbUidumpSchema>, _extra: RequestHandlerExtra) => {\n    log(LogLevel.INFO, \"Dumping UI hierarchy\");\n    \n    const deviceArg = formatDeviceArg(args.device);\n    const tempFilePath = createTempFilePath(\"adb-mcp\", \"window_dump.xml\");\n    const remotePath = args.outputPath || \"/sdcard/window_dump.xml\";\n    \n    try {\n      // Dump UI hierarchy on device\n      const dumpCommand = `adb ${deviceArg}shell uiautomator dump ${remotePath}`;\n      await execPromise(dumpCommand);\n      \n      // Pull the UI dump from the device\n      const pullCommand = `adb ${deviceArg}pull ${remotePath} ${tempFilePath}`;\n      await execPromise(pullCommand);\n      \n      // Clean up the remote file\n      await execPromise(`adb ${deviceArg}shell rm ${remotePath}`);\n```\n\nThe argument to the tool, `AdbDevicesSchema`, is a Zod inferred type defined in the `src/types.ts` file in the project:\n\n```js\nexport const inspectUiInputSchema = {\n  device: z.string().optional().describe(\"Specific device ID (optional)\"),\n  outputPath: z.string().optional().describe(\"Custom output path on device (default: /sdcard/window_dump.xml)\"),\n  asBase64: z.boolean().optional().default(false).describe(\"Return XML content as base64 (default: false)\")\n};\n```\n\nand 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.\n\n\n## Exploitation\n\nWhen 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.\n\nReference 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:\n\n![Cursor defined MCP Server vulnerable to command injection](https://res.cloudinary.com/snyk/image/upload/f_auto,w_2560,q_auto/v1747081395/Screenshot_2025-05-07_at_9.22.11_AM_d76kvm.png)\n\n## Impact\n\nUser initiated and remote command injection on a running MCP Server.\n\n## Recommendation\n\n- Don't use `exec`. Use `execFile` instead, which pins the command and provides the arguments as array elements.\n- 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.\n\n## References and Prior work\n\n1. 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\n2. 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\n3. Liran's [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/book/command-injection)\n\n## Credit\n\nDisclosed by [Liran Tal](https://lirantal.com)","state":0,"publishedAt":"2025-09-24T18:59:22+00:00","modifiedAt":"2026-09-10T03:50:27.950736+00:00","affected":[{"ecosystem":"npm","name":"adb-mcp","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"0.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/srmorete/adb-mcp/security/advisories/GHSA-54j7-grvr-9xwg","https://nvd.nist.gov/vuln/detail/CVE-2025-59834","https://github.com/srmorete/adb-mcp/commit/041729c0b25432df3199ff71b3163a307cf4c28c","https://github.com/srmorete/adb-mcp","https://github.com/srmorete/adb-mcp/blob/master/src/index.ts#L334-L355"],"sourceUrl":"https://github.com/advisories/GHSA-54j7-grvr-9xwg","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-54j7-grvr-9xwg","identifiers":["GHSA-54j7-grvr-9xwg","CVE-2025-59834"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-10T10:21:23.1769119+00:00","complete":true,"records":1773,"lastAttemptAt":"2026-11-10T10:21:23.1769119+00:00","lastSuccessAt":"2026-11-10T10:21:23.4268898+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:23.4268987+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8859cf40d4337e24bd2f258cc7778fbad01bb24c79d057aaf34cf1dfc6f8917d-8bdcdeeb414e06ff50ed637d818ac25d52680d19f71fc0ebe3f4c4b3f836ed38","complete":true,"records":421927,"lastAttemptAt":"2026-11-10T10:21:22.8157744+00:00","lastSuccessAt":"2026-11-10T09:21:38.1064889+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:22.8157744+00:00","snapshotPublishedAt":"2026-11-10T09:20:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2e6a476534094233b48f2f0b6da5cf35","complete":true,"records":13689,"lastAttemptAt":"2026-11-10T10:21:50.2500014+00:00","lastSuccessAt":"2026-11-10T06:05:35.03+00:00","error":null,"lastVerifiedAt":"2026-11-10T06:05:35.03+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13742,"expectedIdentifiers":13742,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-10T10:21:23.1769119+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-10T10:21:23.1769119+00:00","lastSuccessAt":"2026-11-10T10:21:23.4276529+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:23.4276532+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-b0b0499af228434598651aa5d221386e","complete":false,"records":13695,"lastAttemptAt":"2026-11-10T10:21:49.6403901+00:00","lastSuccessAt":"2026-11-10T10:21:49.637+00:00","error":"100 identifier lookups failed; latest failures include request timeout. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-10T10:21:49.637+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13642,"expectedIdentifiers":13742,"failedIdentifiers":100},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-cdffb4589856378aa42e8d1bd4a6c74e27a180d8160bf764c44715ef760f0a62","complete":true,"records":9932,"lastAttemptAt":"2026-11-10T10:21:23.1241572+00:00","lastSuccessAt":"2026-11-10T00:04:19.8260565+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:23.1241572+00:00","snapshotPublishedAt":"2026-11-09T23:48:01+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-26503967ae4379db8f374089589d6e03fb15bd31f820c9e992aaf93840c2236c","complete":true,"records":1971,"lastAttemptAt":"2026-11-10T10:21:22.8858542+00:00","lastSuccessAt":"2026-11-09T21:02:20.472473+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:22.8858542+00:00","snapshotPublishedAt":"2026-11-09T20:18:18+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-94169eec81ea3989aa551092397ff34ae53c104b4a6ce646e1524452e4ab2a39","complete":true,"records":3065,"lastAttemptAt":"2026-11-10T10:21:23.1397622+00:00","lastSuccessAt":"2026-11-10T08:04:45.5923716+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:23.1397622+00:00","snapshotPublishedAt":"2026-11-10T06:48:01+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-4331051b0b2d4ccdbdca3aa196b0be3818a465064a4b18dde4cf39c2250eb490","complete":true,"records":231599,"lastAttemptAt":"2026-11-10T10:21:23.0142877+00:00","lastSuccessAt":"2026-11-10T08:04:37.1757322+00:00","error":null,"lastVerifiedAt":"2026-11-10T10:21:23.0142877+00:00","snapshotPublishedAt":"2026-11-10T07:33:02+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}