Skip to main content
Mallory
← Back to News
ai-platform-securityendpoint-software-vulnerabilitywidely-deployed-product-advisoryinitial-access-method

OpenCode AI Coding Agent RCE via Unauthenticated Local Server and Web UI XSS

Emerging Technology Risk · 3 sources · Updated 5mo ago · First seen Jan 14, 2026

OpenCode AI Coding Agent RCE via Unauthenticated Local Server and Web UI XSS

Security researchers disclosed two high-severity vulnerabilities in the open-source OpenCode AI coding agent that can allow arbitrary command execution on a developer workstation in drive-by scenarios. CVE-2026-22812 stems from OpenCode automatically starting an unauthenticated HTTP server with permissive CORS (Access-Control-Allow-Origin: *), enabling any local process—or a malicious website via cross-origin requests—to invoke sensitive local API endpoints and execute shell commands with the user’s privileges. Separately, CVE-2026-22813 is a critical issue in the OpenCode web UI where the markdown renderer can inject arbitrary HTML into the DOM without sanitization (no DOMPurify and no CSP), enabling JavaScript execution on the http://localhost:4096 origin and subsequent access to local APIs that can spawn processes.

Mitigations are available for both OpenCode issues: CVE-2026-22812 is fixed in OpenCode 1.0.216, and CVE-2026-22813 is fixed in OpenCode 1.1.10. Other items in the set describe unrelated vulnerabilities in different products (e.g., a command-injection flaw in an end-of-life VS Code extension, unsafe deserialization in LlamaIndex, ReDoS in LangChain, and various web app SQLi/XSS/access-control issues) and do not materially change the OpenCode risk picture; they should be tracked separately by affected-asset ownership and exposure.

Why it matters

Impact assessment

OpenCode users, especially developers running the agent locally on workstations, are directly affected. The impact is severe because both flaws can lead to arbitrary command execution with the current user’s privileges, enabling code execution, file access, credential theft, and downstream compromise of developer environments.

The exposure is broad for organizations that permit OpenCode on endpoints because exploitation can occur in drive-by scenarios from a malicious website while the local service is running. The story describes credible exploitation paths from the web into localhost services, but it does not provide confirmed in-the-wild exploitation incidents.

Supporting facts

  • Affected product: OpenCode open-source AI coding agent.
  • Affected population: developers and users running OpenCode on local workstations.
  • Primary business risk: workstation compromise, source code exposure, credential theft, and potential lateral movement from developer endpoints.
  • Scope: potentially widespread across any environment using vulnerable OpenCode versions prior to fixed releases.
  • Exploitation conditions: user interaction is required for at least CVE-2026-22812, and malicious website exposure can trigger drive-by exploitation.
  • Known exposed capabilities include shell command execution and arbitrary file reads from the local machine.
  • No explicit public reporting of active exploitation in the wild was included in the references.
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

3 events · Jan 12, 2026 – Jan 14, 2026
  1. Jan 14, 202611mo ago

    Technical details published on drive-by exploitation via malicious websites

    Follow-up reporting explained that CVE-2026-22813 exploited an XSS condition in OpenCode's web UI and that CVE-2026-22812 involved an unauthenticated HTTP server with permissive CORS. The report highlighted exposed endpoints capable of spawning processes and reading arbitrary files from disk through localhost:4096.

  2. Jan 12, 202611mo ago

    Advisories disclose CVE-2026-22812 and CVE-2026-22813 in OpenCode

    Security advisories disclosed CVE-2026-22812 and CVE-2026-22813, describing how malicious websites could abuse OpenCode's localhost services and web UI to execute commands on a developer's machine. The disclosures identified affected versions as OpenCode releases before 1.0.216 and rated the flaws high severity.

  3. Jan 12, 202611mo ago

    OpenCode releases version 1.0.216 to fix two critical flaws

    OpenCode fixed two high-severity vulnerabilities affecting versions prior to 1.0.216, including an unauthenticated local HTTP server issue and an XSS flaw in the web UI. Updating to version 1.0.216 or later mitigates arbitrary command execution and related local file access risks.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.