CVE-2026-22812

HIGH NUCLEI LAB

OpenCode <1.0.216 - Command Injection

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 11 public exploits for CVE-2026-22812. PoCs published by iSee857, rohmatariow, barrersoftware. A Nuclei detection template is also available.

AI-analyzed exploit summary The repository contains a Python script designed to detect CVE-2026-22812 by checking for command execution vulnerabilities in OpenCode. It sends a crafted request to the '/session' endpoint and attempts to execute the 'id' command via the '/session/{id}/shell' endpoint.

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.

Exploits (11)

github SCANNER 40 stars
by iSee857 · pythonpoc
https://github.com/iSee857/CVE-PoC/tree/main/2026/OpenCode-CVE-2026-22812-RCE-poc.py

The repository contains a Python script designed to detect CVE-2026-22812 by checking for command execution vulnerabilities in OpenCode. It sends a crafted request to the '/session' endpoint and attempts to execute the 'id' command via the '/session/{id}/shell' endpoint.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode (version not specified)
No auth needed
Prerequisites: Target URL or list of URLs · Network access to the target
devstral-2 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC 30 stars
by rohmatariow · poc
https://github.com/rohmatariow/CVE-2026-22812-exploit

This repository contains a comprehensive Python-based exploit for CVE-2026-22812, an unauthenticated RCE vulnerability in OpenCode versions prior to 1.0.216. The exploit includes features for interactive shell access, file operations, and system enumeration.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode < 1.0.216
No auth needed
Prerequisites: Network access to target · OpenCode service running on default or specified port
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec STUB 2 stars
by barrersoftware · poc
https://github.com/barrersoftware/opencode-secure

The repository contains TypeScript-based tooling for GitHub API interactions but lacks any exploit code or vulnerability details for CVE-2026-22812. No offensive techniques or PoC exploit logic is present.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: N/A
No auth needed
devstral-2 · analyzed Feb 16, 2026 Full analysis →
github SUSPICIOUS 1 stars
by Hex-Neo · poc
https://github.com/Hex-Neo/CVE-2026-22812-OpenCode-RCE-exp

The repository lacks exploit code and only provides a vague README with a usage command and a screenshot link. No technical details about CVE-2026-22812 or the vulnerability are provided.

Classification
Suspicious 90%
Attack Type
Other
Complexity
Unknown
Reliability
Unknown
Target: unknown
No auth needed
devstral-2 · analyzed Apr 27, 2026 Full analysis →
nomisec WORKING POC 1 stars
by 0xgh057r3c0n · poc
https://github.com/0xgh057r3c0n/CVE-2026-22812

This is a functional exploit for CVE-2026-22812 targeting OpenCode versions below 1.0.216, enabling remote command execution via session manipulation and shell command injection. The script includes session management, file read/write capabilities, and command execution functionality.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode < v1.0.216
No auth needed
Prerequisites: Network access to the target · OpenCode instance running a vulnerable version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by Udyz · poc
https://github.com/Udyz/CVE-2026-22812-Exp

This PoC exploits an unauthenticated command injection vulnerability in a web application by sending a crafted JSON payload to a session endpoint, resulting in arbitrary command execution (e.g., `touch /tmp/grass`). The exploit iterates through available sessions to find a vulnerable one.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Unknown (likely a web application with session management)
No auth needed
Prerequisites: Network access to the target · Target application exposed on the internet
devstral-2 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC
by XZ1r0 · pythonpoc
https://github.com/XZ1r0/cve-2026-poc-collection/tree/main/other/CVE-2026-22812-exploit

This repository contains a functional Python exploit for CVE-2026-22812, targeting OpenCode versions below 1.0.216. The exploit demonstrates unauthenticated remote code execution (RCE) via session creation and command execution endpoints, with additional features for file operations and interactive shell access.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode < 1.0.216
No auth needed
Prerequisites: network access to target · Python 3.7+ · requests library
devstral-2 · analyzed May 21, 2026 Full analysis →
nomisec WORKING POC
by 0xBlackash · poc
https://github.com/0xBlackash/CVE-2026-22812

The repository contains a functional Python exploit for CVE-2026-22812, targeting OpenCode RCE vulnerabilities in versions prior to 1.0.216. The exploit includes session management, command execution, file read/write operations, and proxy support.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode < v1.0.216
No auth needed
Prerequisites: Network access to target · Target running vulnerable OpenCode version
devstral-2 · analyzed Apr 09, 2026 Full analysis →
nomisec WRITEUP
by HodgeLuke · poc
https://github.com/HodgeLuke/ai-agent-security-research

This repository provides a detailed technical analysis and remediation guidance for CVE-2026-22812 and CVE-2026-22813, which involve unauthenticated RCE and XSS-to-RCE vulnerabilities in AI coding agent platforms. It includes exposure data, sources, and an agent-executable remediation manifest.

Classification
Writeup 95%
Attack Type
Rce | Xss
Complexity
Moderate
Reliability
Reliable
Target: OpenCode serve mode, OpenClaw instances
No auth needed
Prerequisites: Network access to vulnerable AI coding agent instances
devstral-2 · analyzed Apr 09, 2026 Full analysis →
nomisec WORKING POC
by CayberMods · poc
https://github.com/CayberMods/CVE-2026-22812-POC

This repository contains a Python-based exploit for CVE-2026-22812, targeting OpenCode servers. The exploit allows for remote command execution (RCE) and file reading by leveraging session creation and command injection via the `/session/{id}/shell` endpoint.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: OpenCode (version not specified)
No auth needed
Prerequisites: Target must be running a vulnerable version of OpenCode · Network access to the target on ports 4095-4100
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER
by mad12wader · poc
https://github.com/mad12wader/CVE-2026-22812

This repository provides a Nuclei template for scanning CVE-2026-22812, an unauthenticated RCE vulnerability in OpenCode. It includes Burp Suite request examples demonstrating the exploit chain.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Theoretical
Target: OpenCode (version unspecified)
No auth needed
Prerequisites: Network access to the target · OpenCode instance with vulnerable endpoint exposed
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

OpenCode < 1.0.216 - Unauthenticated Remote Code Execution
HIGHVERIFIEDby princechaddha
Shodan: http.html:"opencode"

References (1)

Core 1
Core References

Scores

CVSS v3 8.8
EPSS 0.0422
EPSS Percentile 89.0%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Details

CWE
CWE-306 CWE-749 CWE-942
Status published
Products (2)
anoma/opencode < 1.0.216
npm/opencode-ai 0 - 1.0.216npm
Published Jan 12, 2026
Tracked Since Feb 18, 2026