DeepChat, Stored XSS to RCE, CVE-2025-66222 (critical)

Listen to this Post

CVE-2025-66222 is a stored cross-site scripting vulnerability in DeepChat versions 0.5.0 and earlier, specifically within the Mermaid diagram renderer. Attackers can inject malicious JavaScript code into diagrams that are saved and executed when rendered by the application. This XSS occurs in the Electron application context, allowing arbitrary script execution. The vulnerability escalates to remote code execution due to an exposed Electron IPC bridge. Through the XSS payload, attackers can access the IPC to register and start a malicious Model Context Protocol server. This process enables full system control by executing arbitrary commands on the victim’s machine. The attack chain begins with inserting crafted Mermaid syntax containing script tags or event handlers. When a user views the diagram, the JavaScript runs and interacts with the Electron renderer process. The IPC bridge provides privileged access to main process functions, such as spawning new processes. By registering a malicious MCP server via IPC calls, the attacker achieves persistent RCE. The root cause is inadequate input sanitization in the diagram parser and insufficient IPC security. Exploitation requires the attacker to have diagram creation or editing capabilities, often through user inputs. Once exploited, the compromise can lead to data theft, further network attacks, and complete host takeover. Mitigation requires patching the application and implementing strict input validation.
Platform: DeepChat
Version: 0.5.0 earlier
Vulnerability: Stored XSS RCE
Severity: Critical
date: 12/03/2025

Prediction: Patch date unknown

What Undercode Say:

Analytics:

`deepchat –version`

`npm list deepchat`

`electron –version`

`require(‘electron’).ipcMain.eventNames()`

`window.electron.ipcRenderer.send(‘register-mcp’, payload)`

graph LR; A–>B; click A “javascript:alert(‘xss’)”

`ps aux | grep deepchat`

`netstat -tulpn | grep mcp`

How Exploit:

Inject Mermaid XSS

Execute JavaScript payload

Access IPC bridge

Register malicious MCP

Achieve RCE

Protection from this CVE

Update DeepChat version

Sanitize diagram inputs

Restrict IPC channels

Implement CSP

Impact:

Remote code execution

System compromise

Data theft

Persistent access

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top