{"id":"CVE-2026-22812","published":"2026-01-12T22:49:18Z","modified":"2026-01-13T19:07:37Z","title":"OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution","vendor":"anomalyco","product":"opencode","tier":"tail","description":{"text":"OpenCode is an open source AI coding agent. Prior to 1.0.216, OpenCode automatically starts an unauthenticated HTTP server that allows any local process (or any website via permissive CORS) to execute arbitrary shell commands with the user's privileges. This vulnerability is fixed in 1.0.216.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02268,"percentile":0.8372,"provenance":"source"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"},{"id":"CWE-749","name":"Exposed Dangerous Method or Function"},{"id":"CWE-942","name":"Permissive Cross-domain Security Policy with Untrusted Domains"}],"references":[{"url":"https://github.com/anomalyco/opencode/security/advisories/GHSA-vxw4-wv6m-9hhh","tags":["x_refsource_CONFIRM"]}],"priority":{"score":27.9,"factors":[{"name":"EPSS percentile","points":16.74},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"pocGithub":{"count":9,"skipped":0,"earliest":"2026-01-16","earliestUrl":"https://github.com/Udyz/CVE-2026-22812-Exp","repos":[{"name":"rohmatariow/CVE-2026-22812-exploit","url":"https://github.com/rohmatariow/CVE-2026-22812-exploit","stars":34,"created":"2026-01-16"},{"name":"barrersoftware/opencode-secure","url":"https://github.com/barrersoftware/opencode-secure","stars":6,"created":"2026-01-19"},{"name":"0xgh057r3c0n/CVE-2026-22812","url":"https://github.com/0xgh057r3c0n/CVE-2026-22812","stars":2,"created":"2026-01-19"},{"name":"Udyz/CVE-2026-22812-Exp","url":"https://github.com/Udyz/CVE-2026-22812-Exp","stars":1,"created":"2026-01-16"},{"name":"CayberMods/CVE-2026-22812-POC","url":"https://github.com/CayberMods/CVE-2026-22812-POC","stars":1,"created":"2026-01-20"}]},"nuclei":[{"id":"CVE-2026-22812","name":"OpenCode < 1.0.216 - Unauthenticated Remote Code Execution","severity":"high","path":"http/cves/2026/CVE-2026-22812.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-22812.yaml"}],"first":{"date":"2026-01-16","source":"PoC-in-GitHub","url":"https://github.com/Udyz/CVE-2026-22812-Exp"},"provenance":"source"},"vendorSlug":"anomalyco","affectedVersions":[{"vendor":"anomalyco","product":"opencode","versions":["< 1.0.216"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-01-13T14:13:37.474420Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"opencode-ai","vulnerableRanges":["<1.0.216"],"patched":["1.0.216"],"from":["GHSA-vxw4-wv6m-9hhh"],"provenance":"source"}],"summary":{"text":"OpenCode, an open source AI coding agent, automatically starts an HTTP server without authentication, and this flaw exists in versions prior to 1.0.216. An attacker who can reach that server, either from any local process or from a website through permissive CORS, can execute arbitrary shell commands with the user's privileges, and a user interaction such as visiting a malicious page is required in the web-based path.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T00:18:18Z"},"euvd":{"id":"EUVD-2026-2092","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-22812","published":"2026-01-12","fixed":"1.0.216","kev":false},{"cve":"CVE-2026-22813","published":"2026-01-12","fixed":"1.1.10","kev":false,"link":{"from":"CVE-2026-22812","to":"CVE-2026-22813","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:opencode-ai","fromFixed":"1.0.216","toFixed":"1.1.10","daysApart":0},{"kind":"similar","provenance":"machine","score":0.34,"basis":"same product + description similarity"}]}}],"package":"npm:opencode-ai"}}