Medium severity · published Jan 12, 2026
CVE-2026-22813
Malicious website can execute commands on the local system through XSS in the OpenCode web UI
6.1
CVSS
0.9%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.9% · higher than 60% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
OP
opencode · anomalyco
< 1.1.10 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-22813
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-22813
Exploit
https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp
More from opencode
8.8
CVE-2026-22812
OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution
7.5
CVE-2026-119025
open 7.2.0 before 11.0.0 OS Command Injection via PowerShell on Windows
