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

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.

AI-Powered Analysis

AILast updated: 01/12/2026, 23:23:16 UTC

Technical Analysis

CVE-2026-22812 is a critical vulnerability identified in anomalyco's OpenCode, an open-source AI coding agent. Versions prior to 1.0.216 automatically launch an HTTP server without any authentication controls. This server listens locally but is accessible to any local process and, due to overly permissive Cross-Origin Resource Sharing (CORS) policies, can be accessed by any website, effectively exposing the server to remote exploitation. The vulnerability allows attackers to execute arbitrary shell commands with the privileges of the user running OpenCode. This means an attacker can fully compromise the host system, leading to data theft, system manipulation, or denial of service. The vulnerability is classified under CWE-306 (Missing Authentication for Critical Function), CWE-749 (Exposed Dangerous Method or Function), and CWE-942 (Permissive Cross-domain Whitelist). The CVSS v3.1 base score is 8.8, indicating high severity with network attack vector, low attack complexity, no privileges required, but requiring user interaction (likely visiting a malicious website). The vulnerability was publicly disclosed on January 12, 2026, and fixed in version 1.0.216. No known exploits have been reported in the wild yet, but the conditions for exploitation are straightforward, especially in environments where users might visit untrusted websites or run untrusted local processes. The flaw poses a significant risk to any environment running vulnerable OpenCode versions, particularly in development or production AI coding environments.

Potential Impact

For European organizations, the impact of this vulnerability is substantial. Organizations using OpenCode for AI development or automation could face full system compromise if exploited. Confidential data, including proprietary code and intellectual property, could be stolen or altered. Integrity of development environments could be undermined, leading to insertion of malicious code or backdoors. Availability could be disrupted by attackers executing destructive commands or ransomware. The vulnerability's exploitation requires no authentication and can be triggered remotely via a malicious website due to permissive CORS, increasing the attack surface. This is particularly concerning for organizations with developers or AI researchers who might visit untrusted sites or run local scripts. The risk extends to cloud-based development environments hosted in Europe if they use vulnerable OpenCode versions. The potential for lateral movement within networks also exists if attackers gain initial foothold via this vulnerability. Overall, the threat could lead to significant operational disruption, data breaches, and reputational damage.

Mitigation Recommendations

1. Immediate upgrade of OpenCode to version 1.0.216 or later, where the vulnerability is fixed. 2. Restrict network access to the OpenCode HTTP server by implementing local firewall rules or network segmentation to prevent unauthorized local or remote access. 3. Harden CORS policies to allow only trusted origins, eliminating permissive cross-origin access. 4. Educate developers and users to avoid visiting untrusted websites or running untrusted local processes while using OpenCode. 5. Monitor network and system logs for unusual HTTP server activity or unexpected shell command executions. 6. Employ endpoint detection and response (EDR) tools to detect anomalous process behavior indicative of exploitation. 7. For cloud environments, ensure container or VM isolation and apply strict access controls to development tools. 8. Conduct regular vulnerability scans and penetration tests focusing on development tools and local services. 9. Implement application whitelisting to prevent unauthorized execution of shell commands. 10. Establish incident response procedures to quickly contain and remediate any exploitation attempts.

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/12/2026, 11:23:16 PM

Last updated: 1/13/2026, 8:58:09 AM

Views: 14

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