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.
History

Tue, 13 Jan 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Anomalyco
Anomalyco opencode
Vendors & Products Anomalyco
Anomalyco opencode

Mon, 12 Jan 2026 23:00:00 +0000

Type Values Removed Values Added
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.
Title Malicious website can execute commands on the local system through XSS in the OpenCode web UI
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 9.4, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published: 2026-01-12T22:52:35.103Z

Updated: 2026-01-12T22:52:35.103Z

Reserved: 2026-01-09T22:50:10.288Z

Link: CVE-2026-22813

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-01-12T23:15:53.523

Modified: 2026-01-12T23:15:53.523

Link: CVE-2026-22813

cve-icon Redhat

No data.