CVE-2025-67744
XSS in DeepChat Mermaid Component Enables Remote Code Execution
Publication date: 2025-12-16
Last updated on: 2025-12-16
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| thinkinaixyz | deepchat | 0.5.2 |
| markstream | markstream-vue | * |
| thinkinaixyz | deepchat | 0.5.3 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-67744 is a critical Remote Code Execution (RCE) vulnerability in the DeepChat platform affecting versions up to 0.5.2. It arises from unsafe handling of Mermaid diagram rendering in the MarkdownRenderer.vue component, which uses the MermaidBlockNode from the markstream-vue library without proper sanitization. Malicious Mermaid diagrams can include javascript: URIs in click event handlers, enabling arbitrary JavaScript execution. This is worsened by the exposure of the Electron IPC renderer interface (window.electron.ipcRenderer) globally, allowing executed JavaScript to invoke privileged main process handlers and execute system commands. The root cause is lack of sanitization of untrusted Markdown/Mermaid content before rendering, violating secure coding practices. The vulnerability can be mitigated by sanitizing Mermaid content with strict DOMPurify configurations and setting Mermaid's securityLevel to 'strict'. [1]
How can this vulnerability impact me? :
This vulnerability can allow an attacker to execute arbitrary system commands on the affected system remotely. Because it escalates from Cross-Site Scripting (XSS) to full Remote Code Execution (RCE), an attacker can run malicious code with the privileges of the DeepChat application, potentially leading to full system compromise. This can result in data theft, system damage, unauthorized access, and disruption of services. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by identifying if your system is running DeepChat versions prior to 0.5.3, specifically versions β€ 0.5.2, which use the vulnerable Mermaid diagram rendering component. Detection involves checking for the presence of the vulnerable MarkdownRenderer.vue component and the exposure of the Electron IPC renderer interface (window.electron.ipcRenderer) in the global scope. Since the vulnerability allows execution of arbitrary JavaScript via malicious Mermaid diagrams, monitoring for unusual Mermaid content or suspicious click events in Mermaid graphs could indicate exploitation attempts. However, no specific detection commands are provided in the available resources. [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include sanitizing Mermaid content before rendering by using DOMPurify with strict configurations that disable script, iframe, object, embed tags, and event handler attributes, and restrict allowed URI schemes. Additionally, set Mermaid's securityLevel to 'strict' to prevent execution of malicious scripts. Upgrading to DeepChat version 0.5.3, which contains the patch for this vulnerability, is recommended once available. Until then, applying the sanitization and securityLevel settings is critical to reduce risk. [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided resources do not contain information regarding the impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.