OpenCode AI Coding Agent Flaw Lets Malicious Websites Execute Code on Developer Machines
OpenCode versions 1.14.30 through 1.18.21 let a malicious site run code on a developer's machine via the local upgrade API.
Datadog Security Labs disclosed remote code execution in the OpenCode AI coding agent, tracked as GHSA-632h-h47v-g4x4, affecting versions 1.14.30 through 1.18.21 installed with npm, pnpm, or Bun. The unauthenticated local service parses every request body as JSON, so a malicious webpage can drive /global/upgrade to an attacker tarball whose preinstall script runs on the developer machine. Anomaly fixed this in OpenCode 1.18.22 by requiring a semantic version and rejecting text/plain bodies. No CVE was issued; Datadog said 82 vulnerable releases had more than 647,000 downloads between September 17 and 23, 2026, and did not report observed exploitation.
- Affects OpenCode 1.14.30–1.18.21 installed via npm, pnpm, or Bun.
- Unauthenticated localhost upgrade API accepts remote package tarball URLs.
- A hostile page uses form navigation to bypass CORS and run a preinstall script.
- Fixed in OpenCode 1.18.22; track GHSA-632h-h47v-g4x4, not a CVE.
- Datadog cites over 647,000 downloads of vulnerable releases in one week.
- Vendors
- Anomaly
- Products
- OpenCode
- Organizations
- Datadog Security LabsAnomaly
From the original article
3 min read at cybersecuritynews.com
A critical attack path in OpenCode, an open-source AI coding agent, could let a malicious website execute commands on a developer’s computer. Tracked as GHSA-632h-h47v-g4x4, the remote code execution vulnerability combines content-type confusion in OpenCode’s /global/upgrade API with unsafe handling of an attacker-controlled upgrade target. Anomaly fixed the issue in OpenCode 1.
By Guru Baran · cybersecuritynews.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.