CVE-2026-22813
CRITICAL 9.4CVSS 4.0Malicious website can execute commands on the local system through XSS in the OpenCode web UI
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.
- Published
- 12 Jan 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-c83v-7274-4vgp
- Sources
- NVDJSONOSV GHSA-c83v-7274-4vgpJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | CRITICAL 9.4 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | anoma | opencodecpe:2.3:a:anoma:opencode:*:*:*:*:*:-:*:* |
< 1.1.10 | 1.1.10 |
| OSV | npm | opencode-ai | < 1.1.10 | 1.1.10 |
References
- https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-22813 · ADVISORY
- https://github.com/anomalyco/opencode · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 12 Jan 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 13 Jan 2026)