# CVE-2025-58768: DeepChat's Mermaid rendering has XSS leading to RCE

- Severity: Critical 9.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.66%, higher than 53% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-09-09T20:19:52.122Z
- Modified: 2026-06-17T09:44:54.320Z
- Weaknesses: CWE-79, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ThinkInAIXYZ deepchat: < 0.3.5
- thinkinai deepchat: before 0.3.5

## References

- <https://github.com/ThinkInAIXYZ/deepchat/security/advisories/GHSA-f7q5-vc93-wp6j> (exploit, vendor-advisory)

## Sources

- CVE List: [CVE-2025-58768](https://www.cve.org/CVERecord?id=CVE-2025-58768), CVE Terms of Use, modified 2025-09-09
- NVD: [CVE-2025-58768](https://nvd.nist.gov/vuln/detail/CVE-2025-58768), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-58768 · Whole record: https://cve.day/CVE-2025-58768.json · Rebuilt by cve.day 2026-11-25T22:59:04.469Z
