{"id":"CVE-2026-64651","state":"PUBLISHED","title":"AI SDK OpenCode Harness Tool Relay Authorization Bypass","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.","publishedAt":"2026-07-20T20:26:07.497Z","updatedAt":"2026-07-21T12:49:47.977Z","severity":{"score":6.3,"label":"Medium","version":"4.0","vector":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["vercel @ai-sdk/harness-opencode"],"affected":[{"vendor":"vercel","product":"@ai-sdk/harness-opencode","versions":[{"version":"< 1.0.29","status":"affected"}]}],"references":["https://github.com/vercel/ai/security/advisories/GHSA-g48p-5rr5-8rgq","https://github.com/vercel/ai/pull/17105"],"weaknesses":["CWE-863"],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/64xxx/CVE-2026-64651.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-64651","state":"PUBLISHED","datePublished":"2026-07-20T20:26:07.497Z","dateUpdated":"2026-07-21T12:49:47.977Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-07-20T17:11:30.896Z"},"containers":{"cna":{"title":"AI SDK OpenCode Harness Tool Relay Authorization Bypass","descriptions":[{"lang":"en","value":"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":[{"vendor":"vercel","product":"@ai-sdk/harness-opencode","versions":[{"version":"< 1.0.29","status":"affected"}]}],"references":[{"url":"https://github.com/vercel/ai/security/advisories/GHSA-g48p-5rr5-8rgq","name":"https://github.com/vercel/ai/security/advisories/GHSA-g48p-5rr5-8rgq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vercel/ai/pull/17105","name":"https://github.com/vercel/ai/pull/17105","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","subAvailabilityImpact":"NONE","baseScore":6.3,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-863","lang":"en","description":"CWE-863: Incorrect Authorization","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-20T20:26:07.497Z"},"source":{"advisory":"GHSA-g48p-5rr5-8rgq","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-21T12:49:24.395782Z","id":"CVE-2026-64651","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-21T12:49:47.977Z"}}]}}}