CVE-2026-22812

OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution

Published Jan 12, 2026 CVSS 3.1 · 8.8 High EPSS 2.3% KEV · Not listed
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.

Analysis

AI-generated

Technical 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 17% 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.

Remediation

No solution or workaround provided in the CVE record.

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 June 18, 2026 at 05:59 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
Type Values Removed Values Added
First Time appeared Anoma
Anoma opencode
CPEs cpe:2.3:a:anoma:opencode:*:*:*:*:*:-:*:*
Vendors & Products Anoma
Anoma opencode
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Anomalyco
Anomalyco opencode
Vendors & Products Anomalyco
Anomalyco opencode
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'}

Weaknesses
  • CWE-306

    Missing Authentication for Critical Function

  • CWE-749

    Exposed Dangerous Method or Function

  • CWE-942

    Permissive Cross-domain Security Policy with Untrusted Domains

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 13, 2026, 7:07 PM
Reserved
Jan 9, 2026, 10:50 PM
Status
Analyzed
Published
Jan 12, 2026, 11:15 PM
Modified
Jun 17, 2026, 10:20 AM