The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-22812

CVE-2026-22812: OpenCode RCE Vulnerability

CVE-2026-22812 is a remote code execution vulnerability in OpenCode that allows unauthorized execution of shell commands via an unauthenticated HTTP server. This article covers technical details, affected versions, and patches.

Updated: January 22, 2026

CVE-2026-22812 Overview

OpenCode is an open source AI coding agent that prior to version 1.0.216 automatically starts an unauthenticated HTTP server allowing any local process or any website via permissive CORS to execute arbitrary shell commands with the user's privileges. This Missing Authentication for Critical Function (CWE-306) vulnerability poses significant risk as it enables unauthorized command execution without any authentication mechanism in place.

Critical Impact

Attackers can leverage this unauthenticated HTTP server to execute arbitrary shell commands with the same privileges as the user running OpenCode, potentially leading to complete system compromise.

Affected Products

  • OpenCode versions prior to 1.0.216

Discovery Timeline

  • 2026-01-12 - CVE CVE-2026-22812 published to NVD
  • 2026-01-13 - Last updated in NVD database

Technical Details for CVE-2026-22812

Vulnerability Analysis

This vulnerability stems from a fundamental design flaw in OpenCode's architecture where an HTTP server is automatically started without implementing any form of authentication. The server's permissive CORS (Cross-Origin Resource Sharing) configuration further exacerbates the issue by allowing requests from any origin, including malicious websites visited by the user. This combination creates a dangerous attack surface where both local processes and remote websites can interact with the server to execute arbitrary commands.

The impact of successful exploitation is severe, as commands execute with the full privileges of the user running the OpenCode application. This could result in unauthorized data access, malware installation, lateral movement within a network, or complete system takeover depending on the user's privilege level.

Root Cause

The root cause is classified under CWE-306 (Missing Authentication for Critical Function). The OpenCode application fails to implement authentication controls on its HTTP server endpoint, allowing any entity that can reach the server to execute commands. The permissive CORS policy removes browser-based security restrictions, enabling cross-origin attacks from malicious websites.

Attack Vector

The attack can be executed via network access, requiring user interaction (such as visiting a malicious website). An attacker could craft a malicious webpage that, when visited by a user running OpenCode, makes requests to the local HTTP server to execute arbitrary shell commands. Alternatively, any malicious process running on the local system could directly interact with the unauthenticated server to gain command execution capabilities.

The vulnerability mechanism involves an HTTP server that accepts command execution requests without verifying the identity or authorization of the requester. Due to the permissive CORS configuration, even cross-origin requests from untrusted websites are processed, allowing browser-based exploitation. For detailed technical information, see the GitHub Security Advisory.

Detection Methods for CVE-2026-22812

Indicators of Compromise

  • Unexpected outbound network connections originating from the OpenCode process
  • Unusual child processes spawned by the OpenCode application
  • Suspicious HTTP requests to localhost on OpenCode's listening port from browser processes
  • Evidence of shell command execution in system logs tied to the OpenCode user context

Detection Strategies

  • Monitor for HTTP server processes started by OpenCode listening on unexpected ports
  • Implement network monitoring to detect cross-origin requests targeting local services
  • Deploy endpoint detection rules to identify unauthorized command execution patterns from OpenCode
  • Audit browser history and network logs for connections to known malicious domains that may exploit this vulnerability

Monitoring Recommendations

  • Enable detailed logging for the OpenCode application and review for unauthorized command execution attempts
  • Configure SIEM rules to alert on process chains where OpenCode spawns unexpected shell processes
  • Monitor for anomalous localhost HTTP traffic patterns that may indicate exploitation attempts
  • Implement file integrity monitoring on systems running OpenCode to detect unauthorized changes

How to Mitigate CVE-2026-22812

Immediate Actions Required

  • Upgrade OpenCode to version 1.0.216 or later immediately
  • If upgrade is not immediately possible, disable or stop the OpenCode application until patching is complete
  • Review system logs for any evidence of exploitation prior to patching
  • Audit systems running OpenCode for unauthorized changes or suspicious activity

Patch Information

The vulnerability has been addressed in OpenCode version 1.0.216. Users should upgrade to this version or later to remediate the vulnerability. The fix implements proper authentication controls for the HTTP server functionality. For more information, refer to the GitHub Security Advisory.

Workarounds

  • Block network access to the OpenCode HTTP server port using host-based firewall rules if upgrading is not immediately possible
  • Restrict browser access to localhost services using browser security extensions or policies
  • Run OpenCode in an isolated environment or container with limited network access and reduced privileges
  • Implement network segmentation to limit the impact of potential exploitation
bash
# Example: Block access to OpenCode server port using iptables (adjust port as needed)
# Identify the port OpenCode listens on and block external access
iptables -A INPUT -p tcp --dport <opencode_port> -j DROP

# Alternative: Use firewalld to restrict access
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" port port="<opencode_port>" protocol="tcp" reject'
firewall-cmd --reload

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpencode

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-306
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-22813: OpenCode AI Coding Agent XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English