Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-22812: CWE-306: Missing Authentication for Critical Function in anomalyco opencode

0
High
VulnerabilityCVE-2026-22812cvecve-2026-22812cwe-306cwe-749cwe-942
Published: Mon Jan 12 2026 (01/12/2026, 22:49:18 UTC)
Source: CVE Database V5
Vendor/Project: anomalyco
Product: opencode

Description

CVE-2026-22812 is a high-severity vulnerability in anomalyco's OpenCode AI coding agent versions prior to 1. 0. 216. The flaw involves the automatic startup of an unauthenticated HTTP server that permits any local process or any website (due to permissive CORS settings) to execute arbitrary shell commands with the user's privileges. This missing authentication for a critical function allows attackers to compromise confidentiality, integrity, and availability of affected systems. The vulnerability is fixed in version 1. 0. 216. Although no known exploits are currently reported in the wild, the ease of exploitation and potential impact make it a significant threat. European organizations using vulnerable OpenCode versions are at risk, especially those with development environments or CI/CD pipelines integrating this tool.

AI-Powered Analysis

AILast updated: 01/21/2026, 03:04:56 UTC

Technical Analysis

CVE-2026-22812 is a vulnerability classified under CWE-306 (Missing Authentication for Critical Function), CWE-749 (Exposed Dangerous Method or Function), and CWE-942 (Permissive Cross-domain Whitelist). OpenCode, an open-source AI coding assistant developed by anomalyco, prior to version 1.0.216, automatically launches an HTTP server without requiring authentication. This server listens locally and, due to overly permissive Cross-Origin Resource Sharing (CORS) policies, can be accessed not only by local processes but also by any website, enabling remote code execution. Attackers can exploit this by sending crafted HTTP requests to execute arbitrary shell commands with the privileges of the user running OpenCode. The vulnerability impacts confidentiality (exposure of sensitive data), integrity (unauthorized code execution), and availability (potential system disruption). The CVSS v3.1 score of 8.8 reflects the network attack vector, low attack complexity, no privileges required, but requiring user interaction (e.g., visiting a malicious website). The vulnerability is fixed in OpenCode version 1.0.216 by introducing proper authentication and tightening CORS policies. No public exploits have been reported yet, but the risk remains high due to the ease of exploitation and the critical nature of the flaw.

Potential Impact

For European organizations, this vulnerability poses a significant risk, particularly for software development firms, research institutions, and enterprises integrating AI coding tools into their workflows. Exploitation could lead to unauthorized command execution, data theft, insertion of malicious code into software projects, and disruption of development environments. The breach of confidentiality and integrity could compromise intellectual property and sensitive customer data. Additionally, availability impacts could halt development pipelines, causing operational delays. Given the permissive CORS settings, even web-based attacks are feasible, increasing the attack surface. Organizations relying on OpenCode in multi-user or networked environments face elevated risks. The potential for lateral movement within internal networks also exists if attackers gain initial access via this vulnerability.

Mitigation Recommendations

Immediate upgrade to OpenCode version 1.0.216 or later is essential to remediate this vulnerability. Organizations should audit their environments to identify any instances of OpenCode running vulnerable versions. Network segmentation should be enforced to restrict access to the local HTTP server only to trusted processes or users. Implement strict firewall rules or local host-based access controls to prevent external or unauthorized internal access. Review and tighten CORS policies to limit origins that can interact with the HTTP server. Employ endpoint detection and response (EDR) tools to monitor for suspicious command execution activities. Educate users about the risks of visiting untrusted websites that could exploit this vulnerability via CORS. Finally, integrate vulnerability scanning for OpenCode versions into regular security assessments and CI/CD pipelines.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-09T22:50:10.288Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69657efdda2266e838423032

Added to database: 1/12/2026, 11:08:45 PM

Last enriched: 1/21/2026, 3:04:56 AM

Last updated: 2/7/2026, 5:17:18 AM

Views: 362

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats