CVE-2025-66481
Homebrew vulnerability analysis and mitigation

Overview

CVE-2025-66481 is a critical Cross-Site Scripting (XSS) vulnerability in DeepChat, an open-source AI chat platform, that enables Remote Code Execution (RCE) on victim machines. It affects DeepChat versions 0.5.1 and below, stemming from an incomplete security patch in MermaidArtifact.vue that fails to properly sanitize Mermaid diagram content. The vulnerability was published on December 8–9, 2025, with no fix available at the time of initial disclosure. It carries a CVSS v3.1 base score of 9.6 (Critical) (GitHub Advisory, Red Hat CVE).

Technical details

The root cause is improper neutralization of input during web page generation (CWE-79, CWE-80) combined with code injection (CWE-94). The existing regex-based sanitization in MermaidArtifact.vue only strips event handler attributes enclosed in quotes (/on\w+\s*=\s*["'][^"']*["']/gi), but fails to handle unquoted HTML attributes (e.g., onerror=alert(1)) and HTML entity-encoded payloads (e.g., using &#39; to bypass string filters). Additionally, the tag blacklist is incomplete, missing elements like <image> that support event handlers. By crafting malicious Mermaid diagram content with unquoted attributes and entity-encoded characters, an attacker can inject JavaScript that executes via the electron.ipcRenderer interface, escalating from XSS to full RCE in the Electron desktop application context (GitHub Advisory).

Impact

Successful exploitation allows an attacker to achieve Remote Code Execution on the victim's machine through the Electron ipcRenderer interface, effectively escaping the browser sandbox. This can result in full system compromise, including theft of sensitive data, installation of malware, manipulation of the DeepChat application, and potential lateral movement within the victim's network. All three security pillars — confidentiality, integrity, and availability — are rated High in the CVSS scoring (GitHub Advisory, Red Hat CVE).

Exploitation steps

  1. Craft malicious Mermaid content: Construct a Mermaid diagram payload using an unquoted HTML attribute with HTML entity encoding to bypass the regex filter, for example embedding an <image> tag with an onerror handler using entity-encoded characters.
  2. Deliver the payload: Send the malicious Mermaid content to the target DeepChat user via a shared conversation, chat message, or any mechanism that causes DeepChat to render Mermaid diagrams (e.g., a message containing a graph TD block with the injected payload).
  3. Trigger rendering: When the victim views the message in DeepChat (versions ≤ 0.5.1), the application renders the Mermaid content in MermaidArtifact.vue. The regex sanitizer fails to strip the unquoted event handler attribute.
  4. Execute JavaScript: The browser/Electron renderer evaluates the injected event handler (e.g., onerror=...), executing attacker-controlled JavaScript within the Electron renderer process.
  5. Escalate to RCE: Leverage the electron.ipcRenderer interface — accessible in the renderer process — to invoke privileged Node.js APIs, achieving arbitrary code execution on the victim's host machine (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected outbound connections from the DeepChat Electron process to unknown external IP addresses or domains following rendering of Mermaid content.
  • Process: Unusual child processes spawned by the DeepChat Electron process (e.g., cmd.exe, powershell.exe, /bin/sh, curl, wget) that are not part of normal application behavior.
  • Logs: Application logs showing errors or exceptions originating from MermaidArtifact.vue or Mermaid rendering components; IPC (inter-process communication) calls to electron.ipcRenderer with unexpected arguments.
  • File System: Newly created or modified files in user directories (e.g., temp folders, startup directories) by the DeepChat process; presence of dropped scripts or executables not associated with normal DeepChat operation.
  • Application: Unexpected behavior in DeepChat after viewing a message containing a Mermaid diagram, such as application crashes, unauthorized settings changes, or new processes launched.

Mitigation and workarounds

No official patch was available at the time of initial publication (December 2025); users should check the DeepChat GitHub repository for updated releases beyond version 0.5.1. As immediate workarounds: disable or restrict DeepChat usage until a fix is confirmed; avoid rendering Mermaid content from untrusted sources; implement strict network egress controls on machines running DeepChat; and consider switching to an alternative AI chat platform temporarily. Organizations should also monitor endpoints running DeepChat for anomalous process or network activity (GitHub Advisory, Red Hat CVE).

Community reactions

The vulnerability was reported by security researcher c2an1 and published via GitHub Security Advisories by zerob13 on December 8, 2025. Red Hat tracked the CVE and assigned it a medium category estimate despite the critical CVSS score. CISA included it in a vulnerability bulletin (SB25-349), and ENISA registered it under EUVD-2025-201843 with a slightly higher base score of 9.7. Community aggregators such as Vulners, CIRCL, and VulDB indexed the advisory shortly after publication, reflecting standard industry tracking with no notable controversy or widespread media coverage (GitHub Advisory, Red Hat CVE).

Additional resources


SourceThis report was generated using AI

Related Homebrew vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-12946CRITICAL9.9
  • Homebrew logoHomebrew
  • langflow
NoYesJul 30, 2026
CVE-2026-68981HIGH8.8
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026
CVE-2026-13444HIGH8.1
  • Homebrew logoHomebrew
  • langflow
NoYesJul 30, 2026
CVE-2026-68979MEDIUM5.9
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026
CVE-2026-68980LOW2.3
  • NixOS logoNixOS
  • cpe:2.3:a:apache:nifi
NoYesAug 03, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management