PoC Monitor
← All CVEs
CVE-2026-22812published 12 Jan 2026 22:49 UTCData: JSON · API

OpenCode

OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution

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.

First public PoC 3.5 daysafter publication · 16 Jan 2026
Public PoCs98 on GitHub · 1 Exploit-DB, Metasploit or nuclei
CVSS8.8high · scored by CNA · CWE-306
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

anomalyco opencode
  • < 1.0.216

Fixed in 1.0.216

Mitigation

Upgrade opencode to 1.0.216 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published12 Jan 2026 · t = 0First public PoC16 Jan 2026 · t+3.5d

First public PoC 3.5 days after publication; not in CISA KEV. First PoC: Udyz/CVE-2026-22812-Exp (created 16 Jan 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

8 PoCs · 1 pending · 2 informational

PoCs 8
RepositoryCreatedStarsAssessment
Udyz/CVE-2026-22812-Exp 16 Jan 2026 +3.5 d 1 PoC
rohmatariow/CVE-2026-22812-exploit 16 Jan 2026 +3.6 d 34 PoC
mad12wader/CVE-2026-22812 18 Jan 2026 +5.4 d 0 Scanner
0xgh057r3c0n/CVE-2026-22812 19 Jan 2026 +6.9 d 2 PoC
CayberMods/CVE-2026-22812-POC 20 Jan 2026 +7.6 d 1 PoC
0xBlackash/CVE-2026-22812 6 Apr 2026 +83 d 1 PoC
0xredash/CVE-2026-22812 6 Apr 2026 +83 d 1 PoC
ashrafzaryouh/CVE-2026-22812 6 Apr 2026 +83 d 1 PoC
Pending 1
RepositoryCreatedStarsAssessment
barrersoftware/opencode-secure 19 Jan 2026 +6.3 d 6 Pending · repository exceeds size limit
Informational 2
RepositoryCreatedStarsAssessment
HodgeLuke/ai-agent-security-research 29 Mar 2026 +76 d 1 Informational · detection
Hex-Neo/CVE-2026-22812-OpenCode-RCE-exp 27 Apr 2026 +104 d 1 Informational · write-up

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.
SourceTitlePublishedFound by us
nuclei templatenuclei template: OpenCode < 1.0.216 - Unauthenticated Remote Code Execution27 Jan 202614 Nov 2026

PoC characteristics

What to hunt for in your logs · from 8 PoC repos

POST /session

Key headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Language: en-US;q=0.6,en;q=0.5,zh-CN;q=0.4,zh;q=0.3,fa;q=0.2 Cache-Control: no-cache Pragma: no-cache Upgrade-Insecure-Requests: 1
Body markers
"agent":"build" "command" "test":"scanner" in application/json
Ports
4096, 8080
PoC User-Agent
Mozilla/5.0 (OpenCode/CVE-2026-22812-Exp) Mozilla/5.0 (X11; Linux x86_64)
Seen in
8 repos: 0xBlackash/CVE-2026-22812, 0xgh057r3c0n/CVE-2026-22812, 0xredash/CVE-2026-22812, CayberMods/CVE-2026-22812-POC, Udyz/CVE-2026-22812-Exp, ashrafzaryouh/CVE-2026-22812, mad12wader/CVE-2026-22812, rohmatariow/CVE-2026-22812-exploit
Evidence
0xBlackash/CVE-2026-22812/CVE-2026-22812.py:93 0xBlackash/CVE-2026-22812/CVE-2026-22812.py:114 0xBlackash/CVE-2026-22812/CVE-2026-22812.py:140 0xBlackash/CVE-2026-22812/CVE-2026-22812.yaml:35 0xgh057r3c0n/CVE-2026-22812/CVE-2026-22812.py:93 0xgh057r3c0n/CVE-2026-22812/CVE-2026-22812.py:114

POST /session/{var}/shell

Key headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Language: en-US;q=0.6,en;q=0.5,zh-CN;q=0.4,zh;q=0.3,fa;q=0.2 Cache-Control: no-cache Pragma: no-cache Upgrade-Insecure-Requests: 1
Body markers
"agent":"build" "command":"echo CVE202622812VULN" "command" "command":"touch /tmp/grass" "command":"id" in application/json
Ports
4096, 8080
PoC User-Agent
Mozilla/5.0 (OpenCode/CVE-2026-22812-Exp) Mozilla/5.0 (X11; Linux x86_64)
Seen in
7 repos: 0xBlackash/CVE-2026-22812, 0xgh057r3c0n/CVE-2026-22812, 0xredash/CVE-2026-22812, CayberMods/CVE-2026-22812-POC, Udyz/CVE-2026-22812-Exp, ashrafzaryouh/CVE-2026-22812, mad12wader/CVE-2026-22812
Evidence
0xBlackash/CVE-2026-22812/CVE-2026-22812.yaml:42 0xgh057r3c0n/CVE-2026-22812/CVE-2026-22812.yaml:42 0xredash/CVE-2026-22812/CVE-2026-22812.yaml:42 CayberMods/CVE-2026-22812-POC/rce.py:58 Udyz/CVE-2026-22812-Exp/CVE-2026-22812.py:30 ashrafzaryouh/CVE-2026-22812/CVE-2026-22812.yaml:42

POST /session/"id"/shell

Body markers
"agent":"build" "command":"id" in application/json
PoC User-Agent
Mozilla/5.0 (X11; Linux x86_64)
Seen in
1 repo: mad12wader/CVE-2026-22812
Evidence
mad12wader/CVE-2026-22812/README.md:18

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /session
(?i)^/session(?:[?#].*)?$
POST /session/{var}/shell
(?i)^/session/[^/?#]*/shell(?:[?#].*)?$
GET /file/content
(?i)^/file/content\?(?:.*&)?path=/etc/hostname.*path=
GET /session
(?i)^/session\?(?:.*&)?path=
POST /pty
(?i)^/pty(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /session
alert http any any -> $HOME_NET [4096,8080] (msg:"GG PoC-Monitor CVE-2026-22812 anomalyco opencode exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/session"; http.header; content:"Accept: text/html,application/xhtml+xml,application/xml|3b|q=0.9,image/avif,image/webp,image/apng,*/*|3b|q=0.8,application/signed-exchange|3b|v=b3|3b|q=0.7"; nocase; http.header; content:"Accept-Language: en-US|3b|q=0.6,en|3b|q=0.5,zh-CN|3b|q=0.4,zh|3b|q=0.3,fa|3b|q=0.2"; nocase; http.header; content:"Cache-Control: no-cache"; nocase; http.header; content:"Pragma: no-cache"; nocase; http.header; content:"Upgrade-Insecure-Requests: 1"; nocase; http.request_body; content:"|22|agent|22|:|22|build|22|"; http.request_body; content:"|22|command|22|"; http.request_body; content:"|22|test|22|:|22|scanner|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-22812; classtype:web-application-attack; sid:9123575; rev:1;)
POST /session/{var}/shell
alert http any any -> $HOME_NET [4096,8080] (msg:"GG PoC-Monitor CVE-2026-22812 anomalyco opencode exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/session/"; http.uri; content:"/shell"; http.header; content:"Accept: text/html,application/xhtml+xml,application/xml|3b|q=0.9,image/avif,image/webp,image/apng,*/*|3b|q=0.8,application/signed-exchange|3b|v=b3|3b|q=0.7"; nocase; http.header; content:"Accept-Language: en-US|3b|q=0.6,en|3b|q=0.5,zh-CN|3b|q=0.4,zh|3b|q=0.3,fa|3b|q=0.2"; nocase; http.header; content:"Cache-Control: no-cache"; nocase; http.header; content:"Pragma: no-cache"; nocase; http.header; content:"Upgrade-Insecure-Requests: 1"; nocase; http.request_body; content:"|22|agent|22|:|22|build|22|"; http.request_body; content:"|22|command|22|:|22|echo CVE202622812VULN|22|"; http.request_body; content:"|22|command|22|"; http.request_body; content:"|22|command|22|:|22|touch /tmp/grass|22|"; http.request_body; content:"|22|command|22|:|22|id|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-22812; classtype:web-application-attack; sid:9258488; rev:1;)
GET /file/content
alert http any any -> $HOME_NET [4096,8080] (msg:"GG PoC-Monitor CVE-2026-22812 anomalyco opencode exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/file/content"; http.uri; content:"path=/etc/hostname"; http.uri; content:"path="; reference:url,poc.griffinguard.io/cve/CVE-2026-22812; classtype:web-application-attack; sid:9288175; rev:1;)
GET /session
alert http any any -> $HOME_NET [4096,8080] (msg:"GG PoC-Monitor CVE-2026-22812 anomalyco opencode exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/session"; http.uri; content:"path="; reference:url,poc.griffinguard.io/cve/CVE-2026-22812; classtype:web-application-attack; sid:9501925; rev:1;)
POST /pty
alert http any any -> $HOME_NET [4096,8080] (msg:"GG PoC-Monitor CVE-2026-22812 anomalyco opencode exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/pty"; reference:url,poc.griffinguard.io/cve/CVE-2026-22812; classtype:web-application-attack; sid:9311880; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /session
title: anomalyco opencode exploit attempt (CVE-2026-22812)
id: gg-pocmon-cve-2026-22812-9123575
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-22812. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-22812
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/session'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.22812
POST /session/{var}/shell
title: anomalyco opencode exploit attempt (CVE-2026-22812)
id: gg-pocmon-cve-2026-22812-9258488
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-22812. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-22812
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/session/'
      - '/shell'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.22812
GET /file/content
title: anomalyco opencode exploit attempt (CVE-2026-22812)
id: gg-pocmon-cve-2026-22812-9288175
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-22812. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-22812
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/file/content'
    cs-uri-query|contains|all:
      - 'path=/etc/hostname'
      - 'path='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.22812
GET /session
title: anomalyco opencode exploit attempt (CVE-2026-22812)
id: gg-pocmon-cve-2026-22812-9501925
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-22812. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-22812
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/session'
    cs-uri-query|contains|all:
      - 'path='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.22812
POST /pty
title: anomalyco opencode exploit attempt (CVE-2026-22812)
id: gg-pocmon-cve-2026-22812-9311880
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-22812. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-22812
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/pty'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.22812