Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to intelligence
ai-platform-securityendpoint-software-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory

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

Updated 3mo agoFirst seen Jan 14, 20263 sources

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.

Share:
OpenCode AI Coding Agent RCE via Unauthenticated Local Server and Web UI XSS
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

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

3 EVENTS
Jan 14, 20265mo 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.

Jan 12, 20265mo 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.

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.

11 LINKEDOpen in app
Organizations
9 linked
WordpressMeta PlatformsMicrosoft CorporationOpencodeGooglecvefeed.ioGitHubAnomaly CoAnomalyco
The operational view lives in Mallory

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, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.

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