CVE-2026-22813
9.40.08%
Localhost to RCE: Poisoning the AI's Brain with CVE-2026-22813
Amit Schendel
Senior Security ResearcherJan 14, 2026·6 min read·4 visits
PoC Available
Executive Summary (TL;DR)
OpenCode, a popular open-source AI coding assistant, failed to sanitize Markdown output from LLMs in its web UI. By tricking a user into connecting their local agent to a malicious server, an attacker can inject JavaScript that pivots from XSS to full RCE, leveraging the agent's native ability to execute shell commands.
A critical Cross-Site Scripting (XSS) vulnerability in the OpenCode AI agent allows attackers to achieve Remote Code Execution (RCE) by hijacking the local web interface via unsanitized Markdown rendering.
Official Patches
Technical Appendix
CVSS Score
9.4/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HEPSS Probability
0.08%
Top 77% most exploited
Affected Systems
OpenCode AI Agent
Affected Versions Detail
| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenCode AnomalyCo | < 1.1.10 | 1.1.10 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| CVSS Score | 9.4 (Critical) |
| Attack Vector | Network |
| Privileges Required | None |
| User Interaction | Required (Clicking link) |
| EPSS Score | 0.00078 |
| Exploit Status | PoC Available |
MITRE ATT&CK Mapping
CWE-79
Cross-site Scripting (XSS)
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Known Exploits & Detection
Subscribe to updates
Get the latest CVE analysis reports delivered to your inbox.