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

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

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.

cve-icon OpenCVE Enrichment

No data.

Weaknesses