Overview
CVE-2025-66222 is a critical security vulnerability affecting DeepChat, a smart assistant powered by artificial intelligence. Specifically, versions 0.5.0 and earlier are susceptible to a Stored Cross-Site Scripting (XSS) vulnerability within the Mermaid diagram rendering functionality. This flaw allows a malicious actor to inject and execute arbitrary JavaScript code within the context of the DeepChat application. More alarmingly, this XSS vulnerability can be escalated to Remote Code Execution (RCE) by exploiting the exposed Electron IPC bridge.
Technical Details
The vulnerability resides in how DeepChat handles Mermaid diagrams. An attacker can craft a malicious Mermaid diagram containing JavaScript code. When a user views or interacts with this diagram within DeepChat, the injected JavaScript code is executed. The exposed Electron Inter-Process Communication (IPC) bridge provides a pathway for escalating the XSS vulnerability to RCE. By registering and starting a malicious MCP (Model Context Protocol) server through the injected JavaScript, an attacker can execute arbitrary code on the user’s machine.
CVSS Analysis
- Severity: CRITICAL
- CVSS Score: 9.6
A CVSS score of 9.6 indicates a critical severity level. This means the vulnerability is easily exploitable, requires minimal user interaction, and can lead to significant damage, including complete system compromise.
Possible Impact
The exploitation of CVE-2025-66222 can have severe consequences:
- Remote Code Execution (RCE): An attacker can gain complete control over the user’s system, allowing them to execute arbitrary commands.
- Data Theft: Sensitive data stored within the DeepChat application or on the user’s system can be stolen.
- Malware Installation: The attacker can install malware, such as ransomware or keyloggers, on the user’s machine.
- Account Takeover: Attackers could potentially compromise user accounts and impersonate them.
- Denial of Service: The vulnerability could be exploited to cause DeepChat to crash or become unavailable.
Mitigation or Patch Steps
The recommended mitigation is to update DeepChat to a version that includes the fix for CVE-2025-66222. Refer to the following resources for more information:
- Upgrade DeepChat: Download and install the latest version of DeepChat from the official source (if available) or a trusted repository.
- Vendor Patch: If a patch is available from the vendor (ThinkInAIXYZ), apply it immediately.
- Workarounds (If Available): Check for any temporary workarounds or configurations provided by the vendor to mitigate the vulnerability until a patch can be applied. This may involve disabling or restricting the use of Mermaid diagrams.
References
- Commit Details: https://github.com/ThinkInAIXYZ/deepchat/commit/371ca7b42e3685aee6e3f0c61e85277ed1ff4db7
- GitHub Security Advisory: https://github.com/ThinkInAIXYZ/deepchat/security/advisories/GHSA-v8v5-c872-mf8r
- NIST NVD: (When available, link to the NVD entry here. Example: https://nvd.nist.gov/vuln/detail/CVE-2025-66222 – Replace with actual link if/when it exists.)
