DeepChat is a smart assistant uses artificial intelligence. Prior to version 0.3.5, in the Mermaid chart rendering component, there is a risky operation of directly using `innerHTML` to set user content. Therefore, any malicious content rendered via Mermaid will directly trigger the exploit chain, leading to command execution. This vulnerability is primarily caused by a failure to fully address the existing XSS issue in the project, leading to another exploit chain. The exploit chain is consistent with the report GHSA-hqr4-4gfc-5p2j, executing arbitrary JavaScript code via XSS and arbitrary commands via exposed IPC. Version 0.3.5 contains an updated fix.
The Mermaid chart rendering component directly inserts user content into the DOM using `innerHTML` without proper sanitization. Malicious content embedded in a Mermaid chart causes arbitrary JavaScript code to execute in the context of the application (XSS). The attacker then exploits the exposed IPC (Inter-Process Communication) mechanism of the Electron application to convert XSS into execution of arbitrary system commands. The vulnerability is another exploit chain related to the incomplete fix of the previously reported bug GHSA-hqr4-4gfc-5p2j.
An attacker can execute arbitrary JavaScript code in the context of the application, and then use the exposed IPC to run arbitrary commands on the victim's operating system, potentially gaining full control over their computer.
DeepChat should be updated to version 0.3.5, which contains a patch that eliminates the described vulnerability.
Thinkinai DeepChat versions before 0.3.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HThinkinai Deepchat
APPThinkinai< 0.3.5
Related vulnerabilities
RCE przez XSS w komponencie Mermaid w DeepChat (Electron IPC)
XSS i RCE w Thinkinai DeepChat przez nieskuteczną sanityzację Mermaid
Stored XSS eskalowany do RCE w DeepChat poprzez renderer Mermaid
RCE jednym kliknięciem w DeepChat przez niebezpieczny handler URL