{"id":"CVE-2026-22813","state":"PUBLISHED","title":"Malicious website can execute commands on the local system through XSS in the OpenCode web UI","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.","publishedAt":"2026-01-12T22:52:35.103Z","updatedAt":"2026-01-13T19:07:23.038Z","severity":{"score":9.4,"label":"Critical","version":"4.0","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","source":"GitHub_M"},"assigner":"GitHub_M","products":["anomalyco opencode"],"affected":[{"vendor":"anomalyco","product":"opencode","versions":[{"version":"< 1.1.10","status":"affected"}]}],"references":["https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/22xxx/CVE-2026-22813.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-22813","state":"PUBLISHED","datePublished":"2026-01-12T22:52:35.103Z","dateUpdated":"2026-01-13T19:07:23.038Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-01-09T22:50:10.288Z"},"containers":{"cna":{"title":"Malicious website can execute commands on the local system through XSS in the OpenCode web UI","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"anomalyco","product":"opencode","versions":[{"version":"< 1.1.10","status":"affected"}]}],"references":[{"url":"https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp","name":"https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","subAvailabilityImpact":"HIGH","baseScore":9.4,"baseSeverity":"CRITICAL","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-01-12T22:52:35.103Z"},"source":{"advisory":"GHSA-c83v-7274-4vgp","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/anomalyco/opencode/security/advisories/GHSA-c83v-7274-4vgp","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-01-13T14:13:29.936632Z","id":"CVE-2026-22813","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-13T19:07:23.038Z"}}]}}}