OpenCode Upgrade Endpoint Enables Browser-Triggered Remote Code Execution
Emerging Technology Risk · 3 sources · Updated 2mo ago · First seen Sep 24, 2026

Datadog Security Labs disclosed GHSA-632h-h47v-g4x4, a remote-code-execution flaw in the local web/API server of the OpenCode AI coding agent. OpenCode versions 1.14.30 through 1.18.21 accepted attacker-controlled upgrade targets that npm, pnpm, or Bun could resolve as remote package tarballs; package lifecycle scripts could then execute on the developer’s machine. A separate content-type validation weakness allowed a malicious website to send a cross-origin top-level text/plain form request containing JSON to the localhost upgrade endpoint, bypassing controls that would ordinarily prevent cross-origin JavaScript requests.
Exploitation requires a vulnerable OpenCode installation obtained through npm, pnpm, or Bun that is running opencode serve or opencode web without password authentication, or where the browser has cached authentication credentials. Anomaly corrected the package-target and request-content-type validation issues in OpenCode 1.18.22; organizations should upgrade affected developer endpoints and avoid exposing unauthenticated local OpenCode web services.
Why it matters
Impact assessment
OpenCode developer endpoints running vulnerable versions can be compromised by merely visiting an attacker-controlled webpage while the local web/API service is active. Successful exploitation executes attacker-supplied package lifecycle code with the privileges of the OpenCode process, creating risk of source-code theft, credential/token theft, developer workstation compromise, and lateral movement.
Scope and severity
- Affected product: Anomaly OpenCode AI coding agent versions 1.14.30 through 1.18.21.
- Exposure condition: OpenCode installed through npm, pnpm, or Bun and running
opencode serveoropencode web. - Default listener:
127.0.0.1:4096; the web interface is unauthenticated by default. - Password-enabled instances remain at risk if the browser has cached HTTP Basic Authentication credentials.
- Public npm data indicates 82 vulnerable releases received more than 647,000 downloads from September 17–23, 2026. This does not establish the number of active or exposed instances.
- No exploitation in the wild is reported in the supplied sources.
Business impact
- Developer machines are the primary target population; software development, technology, and enterprises using OpenCode are exposed.
- Compromise can expose proprietary repositories, cloud credentials, API keys, SSH material, and local development artifacts accessible to the affected user account.


