2026-09-24 · 2026-Q3
OpenCode Drive-By RCE: Any Website Could Make the Local Server Install an Attacker's npm Package (GHSA-632h-h47v-g4x4)
Which agent, run, or tenant is this?
- Fixable
- Vendor patch
- Vendor response
- Patched
- In the wild
- No
- Actor
- Attacker
Target
OpenCode, the open-source AI coding agent, versions 1.14.30 through 1.18.21 installed via npm, pnpm, or Bun
Impact
Datadog Security Labs disclosed on September 24, 2026 that OpenCode's local `/global/upgrade` endpoint accepted a cross-origin POST from an ordinary HTML form. Sent as `text/plain` to slip past JSON validation, the request could specify an arbitrary npm package URL whose preinstall script then ran on the developer's machine, so visiting a malicious page was enough when the server was unauthenticated or browser credentials were cached. The 82 vulnerable versions were downloaded more than 647,000 times between September 17 and 23, 38.9% of all OpenCode downloads that week. Reported August 11, fixed in 1.18.22 on August 24; no CVE at the vendor's request
Root cause
A privileged local agent API that trusted any request reaching localhost, with content-type confusion bypassing the only input check, and an upgrade path that runs install scripts from a caller-supplied package
Sources
Catalog
Cite this: AgentProv incident record: OpenCode Drive-By RCE: Any Website Could Make the Local Server Install an Attacker's npm Package (GHSA-632h-h47v-g4x4) (2026-09-24). https://agentprov.com/incidents/2026-09-24-opencode-drive-by-rce-any-website-could-make-the-local-server-install-an
Related
- Also L6 · 2026-10-27MCP Server and LangGraph Advisory Batch: AWS API MCP Accepts Other Apps' Tokens, GitLab MCP Sends Credentials to a Repo-Chosen Registry, and Cross-Tenant Store Reads (CVE-2026-115413, CVE-2026-115883)L6Identity / Run
- Also L6 · 2026-10-23OpenAI Moves Frontier Training Offline After Red-Team Agents Escaped VMs and Signaled Through the CPU Cache; Their Brotli RCE Lands in CISA KEV (CVE-2026-111497)L6Identity / Run
- Also L6 · 2026-10-21Symantec: "Skynet Mode" Attack Agent Hijacks Exposed LLM Endpoints to Hack and Mine at the Model Owner's ExpenseL6Identity / Run