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

GHSA-4RJ4-RCRQ-GR92

Safari MCP: JavaScript injection through single-quoted tool arguments (backslash not escaped)

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.22.15
Exposición9 hDesde la divulgación, 19 nov 2026, 5:17 p. m.
Detección32 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
05:17 p. m.
02:26 a. m.
05:17 p. m.
07:34 p. m.
09:51 p. m.
12:09 a. m.
02:26 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4RJ4-RCRQ-GR92 divulgada
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
Impact

Sixteen places in `safari.js` placed a tool argument inside a single-quoted JavaScript string literal and escaped the single quote without first escaping backslashes. An argument containing a backslash followed by a quote therefore closed the literal, and the rest of the argument ran as JavaScript in the page.

Seven of the affected arguments belong to read-only tools that are exempt from the tab-ownership check: `filter` in `safari_network_details` and `safari_extract_links`, `level` in `safari_console_filter`, `selector` in `safari_snapshot`, `safari_accessibility_snapshot` and `safari_extract_tables`, and `dbName` / `storeName` in `safari_get_indexed_db`. An MCP client limited to read-only tools (with `safari_evaluate` and `safari_run_script` excluded from its allowlist) could still run arbitrary page JavaScript through them, including in a tab the session does not own. The other affected arguments are `ref` in `safari_select_option`, `safari_react_select_set` and `safari_react_select_list_options`, the key in `safari_press_key`, the file name in `safari_upload_file` and `safari_paste_image`, and the first line of the text in `safari_replace_editor`.

Patches

Fixed in 2.22.15: every affected site uses the shared `escJsSingleQuote`, which escapes the backslash before the quote, and a test fails the build if a quote-only escape returns.

Workarounds

Upgrade to 2.22.15. There is no configuration workaround: excluding `safari_evaluate` and `safari_run_script` from a client's tool list did not prevent the injection.

Credits

Reported privately on 2026-10-09 by Aliaksandr Palei (@fakepooh) under the coordinated-disclosure process in SECURITY.md.

Versiones

Rangos afectados

Afectada Corregida
safari-mcp< 2.22.15
2.22.15
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmsafari-mcp
Corregida 2.22.15 — —
Versiones corregidas2.22.15
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/achiya-automation/safari-mcp/security/advisories/GHSA-4rj4-rcrq-gr92
Otrahttps://github.com/achiya-automation/safari-mcp/commit/23f1319defefd2c5cbd06b23189ab01876a8c5d3
Otrahttps://github.com/achiya-automation/safari-mcp
Otrahttps://github.com/achiya-automation/safari-mcp/releases/tag/v2.22.15

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