CVE-2026-64651
JSON

6.3medium

AI SDK OpenCode Harness Tool Relay Authorization Bypass

Severity
6.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

The `@ai-sdk/harness-opencode` tool connects HarnessAgent to OpenCode through a sandboxed bridge. Prior to version 1.0.28, the tool relay authorizes requests from any process whose command line contains an allowed helper script path (`host-tool-mcp.mjs`). This allows untrusted code executing in the sandbox to invoke arbitrary host-exposed tools including secret lookups, deployment operations, and cloud API calls without a corresponding model-authorized tool-call event. Exploitation requires a Linux environment (the vulnerable fallback checks `process.platform === 'linux'` and reads `/proc`); an active harness session with one or more host-provided tools; and untrusted code executing in the sandbox (e.g. a malicious dependency, build script, or lifecycle hook) The fix in version 1.0.28 removes the process-path authorization fallback entirely. Relay requests are now only accepted after exact, short-lived, one-time authorization matching the tool name and input from a bridge-observed model event. Some workarounds are available. Do not run the OpenCode harness on untrusted repositories or with untrusted dependencies, and/or limit host-exposed tools to non-sensitive operations when working with untrusted code.

Affected

Product or packageVersionsReported by
vercel @ai-sdk/harness-opencode< 1.0.29CVE List

Classification

CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The `@ai-sdk/harness-opencode` tool connects HarnessAgent to OpenCode through a sandboxed bridge. Prior to version 1.0.28, the tool relay authorizes requests from any process whose command line contains an allowed helper script path (`host-tool-mcp.mjs`). This allows untrusted code executing in the sandbox to invoke arbitrary host-exposed tools including secret lookups, deployment operations, and cloud API calls without a corresponding model-authorized tool-call event. Exploitation requires a Linux environment (the vulnerable fallback checks `process.platform === 'linux'` and reads `/proc`); an active harness session with one or more host-provided tools; and untrusted code executing in the sandbox (e.g. a malicious dependency, build script, or lifecycle hook) The fix in version 1.0.28 removes the process-path authorization fallback entirely. Relay requests are now only accepted after exact, short-lived, one-time authorization matching the tool name and input from a bridge-observed model event. Some workarounds are available. Do not run the OpenCode harness on untrusted repositories or with untrusted dependencies, and/or limit host-exposed tools to non-sensitive operations when working with untrusted code.

NVD (es)

La herramienta “@ai-sdk/harness-opencode” conecta HarnessAgent con OpenCode a través de un puente en un sandbox. Antes de la versión 1.0.28, el relé de la herramienta autoriza solicitudes de cualquier proceso cuya línea de comandos contenga una ruta de script auxiliar permitida (’host-tool-mcp.mjs’). Esto permite que código no confiable ejecutándose en el sandbox invoque herramientas arbitrarias expuestas al host, incluyendo búsquedas de secretos, operaciones de despliegue y llamadas a la API en la nube sin un evento de llamada a herramienta autorizado por el modelo correspondiente. La explotación requiere un entorno Linux (la comprobación de reserva vulnerable verifica ’process.platform === ’linux’’ y lee ’/proc’); una sesión de harness activa con una o más herramientas proporcionadas por el host; y código no confiable ejecutándose en el sandbox (por ejemplo, una dependencia maliciosa, un script de compilación o un hook de ciclo de vida). La corrección en la versión 1.0.28 elimina por completo la reserva de autorización por ruta de proceso. Las solicitudes de relé ahora solo se aceptan después de una autorización exacta, de corta duración y de un solo uso que coincida con el nombre de la herramienta y la entrada de un evento de modelo observado por el puente. Algunas soluciones alternativas están disponibles. No ejecute el harness de OpenCode en repositorios no confiables o con dependencias no confiables, y/o limite las herramientas expuestas al host a operaciones no sensibles cuando trabaje con código no confiable.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-64651 changed 2026-07-21CVE Terms of Use
NVDCVE-2026-64651 changed 2026-10-24Public domain