CVE-2025-58768CWE-94

DeepChat's Mermaid rendering has XSS leading to RCE

Critical · published September 9, 2025

CVSS v3.1
9.7
EPSS
1%
Percentile
48.0
In the wild
Unconfirmed
What it is

🚨 A sneaky XSS vulnerability in DeepChat can allow attackers to execute arbitrary commands simply by rendering malicious user content! 🔥 Think of it like a restaurant that lets customers write their own recipes on the order slips without checking them — one bad ingredient and the entire kitchen goes haywire! 🍽️ This vulnerability could enable an attacker to execute any JavaScript code or IPC commands on the server, risking full control over the application. Imagine the chaos if a malicious actor could order the ‘special’ and serve their own dish of havoc!

Put simply

Think of it like a restaurant that lets customers write their own recipes on the order slips without checking them — one bad ingredient and the entire kitchen goes haywire! 🍽️ The issue arises from the Mermaid chart rendering component using `innerHTML` to set user content, which fails to sanitize the input properly, leading to an XSS vulnerability. This allows the execution of arbitrary commands and JavaScript code due to the exploit chain established.

What to do

This vulnerability could enable an attacker to execute any JavaScript code or IPC commands on the server, risking full control over the application. Imagine the chaos if a malicious actor could order the ‘special’ and serve their own dish of havoc! Immediately upgrade to DeepChat version 0.3.5, where this vulnerability is fixed. Additionally, review any user-generated content handling and ensure proper sanitization measures are in place to prevent future attacks! You've got this! Secure your application, and you'll be on your way to security hero status! 🛡️

The record
Technical detail
CVSS v3.1
9.7 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00599 · 48.0th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-09-09T20:19Z
EPSS history
Timeline
  • 09 SEP 20:19Z
    DeepChat's Mermaid rendering has XSS leading to RCE
    cvelistv5