Skip to main content

Ai Sdk Harness Opencode CVE-2026-64651

| EUVDEUVD-2026-46098 MEDIUM
Incorrect Authorization (CWE-863)
2026-07-20 GitHub_M
6.3
CVSS 4.0 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
6.3 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Jul 20, 2026 - 23:18 EUVD
Source Code Evidence Fetched
Jul 20, 2026 - 21:31 vuln.today
Analysis Generated
Jul 20, 2026 - 21:31 vuln.today
CVE Published
Jul 20, 2026 - 20:26 cve.org
MEDIUM 6.3

DescriptionCVE.org

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.

AnalysisAI

Sandbox authorization bypass in Vercel's @ai-sdk/harness-opencode (all versions prior to 1.0.28) permits untrusted code executing inside the OpenCode sandbox to invoke arbitrary host-exposed tools — including secret lookups, deployment operations, and cloud API calls — without a corresponding model-authorized tool-call event. The flawed process-path fallback reads /proc/<pid>/cmdline on Linux to verify the requesting process's command line contains the host-tool-mcp.mjs script path, a check that sandboxed attacker-controlled code can satisfy or spoof. No public exploit code has been identified at time of analysis, and the issue is remediated in v1.0.28 by replacing the path check with short-lived one-time authorization tokens bound to bridge-observed model events.

Share

CVE-2026-64651 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy