CVE-2026-22812CWE-306CWE-749CWE-942

OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution

High · published January 12, 2026

CVSS v3.1
8.8
EPSS
17%
Percentile
97.0
In the wild
Unconfirmed
What it is

⚡ An open HTTP server is unwittingly your own personal command center! Before version 1.0.216, OpenCode let any local process—or even nearby websites—execute shell commands as if they were you! Think of it like a restaurant with an open kitchen: diners can just walk up and ask the chef to make whatever they want. Without a guardrail in place, anyone could request a dish with strange ingredients—or worse, malicious orders! This vulnerability could allow a sneaky attacker to seize control of your system and run any commands with your privileges. Imagine them changing passwords, accessing sensitive data, or even worse, disrupting your entire environment! It's an open invitation to chaos, and that’s absolutely devastating!

Put simply

Think of it like a restaurant with an open kitchen: diners can just walk up and ask the chef to make whatever they want. Without a guardrail in place, anyone could request a dish with strange ingredients—or worse, malicious orders! OpenCode's misconfigured unauthenticated HTTP server prior to version 1.0.216 allows any local process—and even websites via permissive CORS—to execute arbitrary shell commands as the current user. This oversight lacks the necessary authentication checks.

What to do

This vulnerability could allow a sneaky attacker to seize control of your system and run any commands with your privileges. Imagine them changing passwords, accessing sensitive data, or even worse, disrupting your entire environment! It's an open invitation to chaos, and that’s absolutely devastating! To protect your system, immediately update OpenCode to version 1.0.216 or higher. Additionally, review your CORS settings to ensure they aren't too permissive. A little diligence now goes a long way! You've got this! By taking these steps, you can lock down your system and keep the digital villains at bay! 🛡️

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.16538 · 97.0th percentile
Weaknesses
CWE-306 · Missing Authentication for Critical Function; CWE-749 · Exposed Dangerous Method or Function; CWE-942 · Permissive Cross-domain Security Policy with Untrusted Domains
Published
2026-01-12T22:49Z
EPSS history
Timeline
  • 12 JAN 22:49Z
    OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution
    cvelistv5