Skip to main content
Mallory
← Back to News
ai-platform-securityendpoint-software-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory

OpenCode Upgrade Endpoint Enables Browser-Triggered Remote Code Execution

Emerging Technology Risk · 3 sources · Updated 2mo ago · First seen Sep 24, 2026

OpenCode Upgrade Endpoint Enables Browser-Triggered Remote Code Execution

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 serve or opencode 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.
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Apr 29, 2026 – Sep 24, 2026
  1. Sep 24, 20262mo ago

    OpenCode RCE advisory publicly disclosed

    Anomaly published GHSA-632h-h47v-g4x4 after a one-month coordinated-disclosure delay requested following the patch release. The advisory describes remote code execution via the local OpenCode upgrade endpoint in versions 1.14.30 through 1.18.21.

    Discovering and exploiting a remote code execution vulnerability in OpenCode (GHSA-632h-h47v-g4x4) | Datadog Security Labs
  2. Aug 24, 20263mo ago

    Anomaly fixes OpenCode upgrade-endpoint RCE

    Anomaly fixed the vulnerability in PR #44686 and commit c6e76e9, releasing OpenCode 1.18.22. The release restricts upgrade targets to valid semantic versions and enforces request content types, blocking the text/plain cross-origin exploit path.

    Discovering and exploiting a remote code execution vulnerability in OpenCode (GHSA-632h-h47v-g4x4) | Datadog Security Labs
  3. Aug 11, 20264mo ago

    Datadog reports OpenCode RCE privately

    Datadog Security Labs reported the GHSA-632h-h47v-g4x4 vulnerability to Anomaly through GitHub Security Advisories.

    Discovering and exploiting a remote code execution vulnerability in OpenCode (GHSA-632h-h47v-g4x4) | Datadog Security Labs
  4. Apr 30, 20267mo ago

    First affected OpenCode release published

    OpenCode 1.14.30, the first release affected by the upgrade-endpoint remote code execution flaw, was released.

    Discovering and exploiting a remote code execution vulnerability in OpenCode (GHSA-632h-h47v-g4x4) | Datadog Security Labs
  5. Apr 29, 20267mo ago

    Vulnerable OpenCode upgrade code introduced

    OpenCode PR #24853 introduced the vulnerable upgrade code path, allowing arbitrary upgrade targets to reach package-manager installation commands.

    Discovering and exploiting a remote code execution vulnerability in OpenCode (GHSA-632h-h47v-g4x4) | Datadog Security Labs
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Opencode

Observables

4 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.