CVE-2026-64651 Details
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.
A vulnerability exists in the @ai-sdk/harness-opencode tool prior to version 1.0.28, allowing for an authorization bypass in the tool relay. The issue arises because the relay accepts requests from any process whose command line includes a specified helper script path. This flaw enables untrusted code running in a sandboxed environment to execute arbitrary host-exposed tools. Such actions could include accessing secrets, performing deployment tasks, and making cloud API calls, all without the necessary model-authorized tool-call event. The vulnerability is present in Linux environments, where the fallback checks for the platform and reads from the process directory. Exploitation requires an active harness session with host-provided tools and untrusted code in the sandbox, such as a malicious dependency or build script.
Users are advised to upgrade to version 1.0.28 or later. The update removes the problematic process-path authorization fallback and requires precise, short-lived, one-time authorization for relay requests. Additionally, avoid running the OpenCode harness on untrusted repositories or with untrusted dependencies, and restrict host-exposed tools to non-sensitive tasks when dealing with untrusted code.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 20, 2026CISA-ADP
Assessed Jul 21, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vercel/ai/pull/17105 | [email protected] | Issue TrackingVendor |
| https://github.com/vercel/ai/security/advisories/GHSA-g48p-5rr5-8rgq | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-863 | Incorrect Authorization | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| @ai-sdk/harness-opencode | <= 1.0.27 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 21, 2026 | CVE Modified | CISA-ADP |
| Jul 20, 2026 | New CVE Received | [email protected] |
Volerion