CVE-2026-22813 Details
Description
OpenCode is an open source AI coding agent. The markdown renderer used for LLM responses will insert arbitrary HTML into the DOM. There is no sanitization with DOMPurify or even a CSP on the web interface to prevent JavaScript execution via HTML injection. This means controlling the LLM response for a chat session gets JavaScript execution on the http://localhost:4096 origin. This vulnerability is fixed in 1.1.10.
A cross-site scripting vulnerability has been identified in OpenCode, an open-source AI coding agent, in versions prior to 1.1.10. The issue arises because the markdown renderer for large language model (LLM) responses can inject arbitrary HTML into the DOM. There is no proper sanitization with DOMPurify or a Content Security Policy (CSP) on the web interface to block JavaScript execution through HTML injection. This flaw allows manipulation of the LLM response in a chat session, resulting in JavaScript execution on the 'http://localhost:4096' origin. Exploitation of this vulnerability can lead to unauthorized execution of commands on the local system via the OpenCode API's '/pty/' endpoints, which are accessible after the JavaScript injection.
Users are advised to upgrade to OpenCode version 1.1.10 or later, which addresses the vulnerability by disabling the web UI/OpenCode API interaction that allows for such exploits.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp | CISA-ADP | ExploitVendor Advisory |
| https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| anoma opencode | < 1.1.10 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 21, 2026 | Initial Analysis | [email protected] |
| Jan 13, 2026 | CVE Modified | CISA-ADP |
| Jan 12, 2026 | New CVE Received | [email protected] |