| Field | Value |
|---|---|
| CVE / NVD | CVE-2025-66222 |
| EPSS score | 0.005090000 (FIRST EPSS, 2026-06-30) |
| Date (index) | 2025-12-03 |
| Affected product (index) | DeepChat (deepchat; Electron app) — Stored XSS in Mermaid renderer escalated to RCE via MCP server registration |
| GHSA ID | GHSA-v8v5-c872-mf8r |
| OWASP MCP Top 10 (2025) | MCP09 — Shadow MCP Servers |
| Published / disclosed | 2025-12-03 |
| Ecosystem | Electron (npm) |
| Component | DeepChat Mermaid diagram renderer |
| CVSS score | CRITICAL — CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H (base 9.6) |
| CWE | CWE-94 (Code Injection), CWE-79 (XSS) |
| Affected versions | DeepChat 0.5.0 and earlier |
| Fixed versions | No fixed version listed in NVD/GitHub advisory |
| Fix status | Unfixed |
| Exploit status | Public CVE record |
DeepChat is an Electron-based AI assistant supporting multiple providers including MCP. In version 0.5.0 and earlier, the Mermaid diagram renderer sets innerHTML without sanitization, creating a Stored XSS vulnerability. Because DeepChat is an Electron app, the renderer process has access to the IPC bridge. An attacker can escalate the XSS to full RCE by calling window.electron.ipcRenderer.invoke('presenter:call','mcpPresenter','addMcpServer',...) followed by startServer, silently registering and starting a malicious MCP server process under the victim’s OS account.
An attacker must be able to supply a Mermaid diagram that is stored and rendered by the victim’s DeepChat instance — for example via a shared chat history, an imported document, or an MCP tool response containing diagram markup. No authentication to DeepChat is required from the attacker’s side; user interaction (viewing the diagram) triggers the payload.
Unsanitized innerHTML assignment in the Mermaid rendering path combined with unrestricted IPC bridge access from the renderer process, allowing arbitrary MCP server registration without user consent.
The MCP server registration API (mcpPresenter.addMcpServer / startServer) is the escalation primitive: once called, the attacker-specified binary runs as a fully trusted MCP server with access to all tools and host capabilities granted to DeepChat. This makes any XSS in an Electron MCP host functionally equivalent to RCE with persistent tool access.
// Mermaid renderer (before fix): innerHTML set without DOMPurify or equivalent sanitization.
// Exploit chain: XSS → ipcRenderer.invoke('presenter:call','mcpPresenter','addMcpServer', maliciousConfig)
// → mcpPresenter.startServer(maliciousConfig.id)
Upgrade DeepChat to a version containing commit 371ca7b or later. The fix sanitizes Mermaid output before DOM insertion.
If a public PoC exists, prefer vendor advisories and defensive write-ups; do not host weaponized exploit code in this repository.
Help → About. Versions ≤ 0.5.0 are affected.Apply the upstream fix via the commit linked above or wait for an official release that includes it.