CVE-2025-58768

9.6

ThinkInAIXYZ · deepchat

DeepChat prior to 0.3.5 is vulnerable to code injection via the Mermaid chart rendering component due to improper handling of user-supplied content using innerHTML.

Executive summary

DeepChat versions prior to 0.3.5 contain a critical code injection vulnerability that could allow an unauthenticated attacker to execute arbitrary code within the application.

Vulnerability

This vulnerability is a Code Injection (CWE-94) flaw occurring in the Mermaid chart rendering component. An unauthenticated attacker can supply malicious input that is improperly processed via innerHTML, leading to potential cross-site scripting or remote code execution depending on the execution context.

Business impact

Successful exploitation of this vulnerability allows for full system compromise, as indicated by the CVSS score of 9.6. This poses a severe risk to data confidentiality, integrity, and availability, potentially resulting in unauthorized access to sensitive assistant data and full control over the affected application instance.

Remediation

Immediate Action: Update the DeepChat installation to version 0.3.5 or later immediately.

Proactive Monitoring: Monitor application logs for unusual script execution patterns or unauthorized requests directed at the Mermaid rendering endpoint.

Compensating Controls: Deploy a Web Application Firewall (WAF) with rules configured to detect and block malicious payloads containing script tags or suspicious chart rendering syntax.

Exploitation status

Public Exploit Available: Unknown

Analyst recommendation

Given the critical nature of this vulnerability and the high CVSS score, organizations must prioritize patching to version 0.3.5. Failure to address this flaw leaves the application open to severe exploitation, and immediate administrative action is required to secure the environment.