Quick answers
- Is CVE-2026-22813 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-22813 being exploited in the wild.
- How severe is CVE-2026-22813?
- Medium severity, with a CVSS score of 4, published 13 January 2026.
- Which products and versions are affected?
- Anomaly OpenCode <1.1.10; opencode-ai (npm) SEMVER:introduced=0,fixed=1.1.10.
- Is there a fix for CVE-2026-22813?
- Yes. opencode-ai (npm): upgrade to 1.1.10 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-22813 attacked?
- It is attacked over the network.
- Am I affected by CVE-2026-22813?
- Check whether you run Anomaly OpenCode or opencode-ai (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- opencode-ai (npm): upgrade to 1.1.10 or later
npm install opencode-ai@1.1.10
Technical details
OpenCode suffers from a stored cross-site scripting (XSS) vulnerability combined with an insecure server URL override feature and unprotected API endpoints. The vulnerability chain works as follows: (1) The OpenCode web UI accepts a ?url= parameter to load chat sessions from a custom server location, (2) the markdown renderer that displays LLM responses does not sanitize HTML input or enforce content security policy, allowing arbitrary HTML/JavaScript injection, (3) an attacker can craft a malicious URL directing a user to http://localhost:4096/?url=attacker.com, which loads a chat session containing JavaScript payload embedded in an image onerror handler, (4) this JavaScript executes in the localhost:4096 origin, (5) JavaScript can then make same-origin requests to the /pty/ API endpoints to spawn arbitrary processes on the local machine. User interaction is required (clicking a malicious link). The OpenCode team mitigated the specific ?url= bypass on the server-side as of January 9, 2026, but the underlying XSS and unprotected API remain exploitable via other XSS vectors. Users should upgrade to version 1.1.10 or later.
Affected products
- Anomaly OpenCode <1.1.10
Identifiers
- CVE-2026-22813
- GHSA-c83v-7274-4vgp
Timeline
- 2026-01-13: disclosed
- 2026-01-09: patched: Server-side mitigation for ?url= parameter bypass deployed
- 2026-01-13: advisory: GHSA-c83v-7274-4vgp published