CVE-2026-22812 OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution

High 8.8 Published Updated

An unauthenticated local HTTP server in OpenCode allows arbitrary shell command execution via permissive CORS, requiring an upgrade to secure the tool.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-22812?

CVE-2026-22812 is a high-severity command injection vulnerability in anomalyco opencode, published on 12 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-942, CWE-749, CWE-306

Which versions are affected by CVE-2026-22812?

2 open source packages ship an affected version, including opencode-ai. It affects 1 product.

PackageAffectedFixed in
opencode-ai npmAll versions1.0.216
opencode-ai npmAll versions1.0.216

Products include Anoma Opencode.

How do I fix CVE-2026-22812?

Upgrade opencode-ai to 1.0.216 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-22812 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-22812 exists.

Public exploit code: 1 Nuclei template and 9 proofs of concept on GitHub.

Sources

Also known as GHSA-vxw4-wv6m-9hhh.

Is CVE-2026-22812 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free