CVE-2026-22813

Malicious website can execute commands on the local system through XSS in the OpenCode web UI

Published Jan 12, 2026 CVSS 4.0 · 9.4 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-c83v-7274-4vgp Malicious website can execute commands on the local system through XSS in the OpenCode web UI
History
Type Values Removed Values Added
First Time appeared Anoma
Anoma opencode
CPEs cpe:2.3:a:anoma:opencode:*:*:*:*:*:-:*:*
Vendors & Products Anoma
Anoma opencode
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Anomalyco
Anomalyco opencode
Vendors & Products Anomalyco
Anomalyco opencode
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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 13, 2026, 7:07 PM
Reserved
Jan 9, 2026, 10:50 PM
Status
Analyzed
Published
Jan 12, 2026, 11:15 PM
Modified
Jun 17, 2026, 10:20 AM