Description
OpenCode is an open source AI coding agent. Prior to 1.0.216, OpenCode automatically starts an unauthenticated HTTP server that allows any local process (or any website via permissive CORS) to execute arbitrary shell commands with the user's privileges. This vulnerability is fixed in 1.0.216.
Published: 2026-01-12
Score: 8.8 High
EPSS: 3.5% Low
KEV: No
Impact: Command Injection via Unauthenticated HTTP Server
Action: Immediate Patch
AI Analysis

Impact

anomalyco:opencode AI coding agent launches an HTTP server that does not require any authentication, allowing any local process or a web page that can access the server (due to permissive CORS) to execute arbitrary shell commands under the privileges of the user running the agent. This flaw is a combination of Missing Authentication, Command Injection, and Privilege Escalation weaknesses that enable an attacker to run any command on the host, recover data, modify files, or maintain persistence. The result is a high‑impact compromise of confidentiality, integrity, and possibly availability of the affected system.

Affected Systems

Versions of OpenCode older than 1.0.216 are affected. The vulnerability applies to the anomalyco:opencode product as distributed on all supported platforms before that release.

Risk and Exploitability

The CVSS vector scores the vulnerability as 8.8, confirming high severity. EPSS indicates a 4% probability of exploitation at the time of analysis, reflecting a moderate likelihood that attackers will seek or have access to the vulnerable environment. The flaw is not listed in the CISA KEV catalog. Attackers who can reach the unauthenticated HTTP endpoint—either by running a local process or by loading a malicious website that can issue cross‑origin requests—can command the agent to run any shell command without restrictions.

Generated by OpenCVE AI on April 18, 2026 at 16:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenCode to version 1.0.216 or later, which disables the unauthenticated HTTP server and adds proper authentication before accepting shell commands.
  • If an immediate upgrade is not possible, disable or restrict the HTTP server’s listening interface to localhost or a secure network segment to prevent external access.
  • Remove or tighten the project’s CORS policy so that only trusted origins can interact with the HTTP endpoint, mitigating the risk of cross‑origin command execution.

Generated by OpenCVE AI on April 18, 2026 at 16:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vxw4-wv6m-9hhh OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution
History

Wed, 21 Jan 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Anoma
Anoma opencode
CPEs cpe:2.3:a:anoma:opencode:*:*:*:*:*:-:*:*
Vendors & Products Anoma
Anoma opencode

Tue, 13 Jan 2026 20:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 13 Jan 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Anomalyco
Anomalyco opencode
Vendors & Products Anomalyco
Anomalyco opencode

Mon, 12 Jan 2026 23:00:00 +0000

Type Values Removed Values Added
Description OpenCode is an open source AI coding agent. Prior to 1.0.216, OpenCode automatically starts an unauthenticated HTTP server that allows any local process (or any website via permissive CORS) to execute arbitrary shell commands with the user's privileges. This vulnerability is fixed in 1.0.216.
Title OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution
Weaknesses CWE-306
CWE-749
CWE-942
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Anoma Opencode
Anomalyco Opencode
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-01-13T19:07:37.056Z

Reserved: 2026-01-09T22:50:10.288Z

Link: CVE-2026-22812

cve-icon Vulnrichment

Updated: 2026-01-13T14:13:39.967Z

cve-icon NVD

Status : Analyzed

Published: 2026-01-12T23:15:53.370

Modified: 2026-01-21T15:14:59.607

Link: CVE-2026-22812

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-18T16:30:05Z

Weaknesses