PT-2026-33374 · Siyuan · Siyuan

Published

2026-04-16

·

Updated

2026-04-18

·

CVE-2026-40322

CVSS v3.1

9.0

Critical

VectorAV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions SiYuan versions prior to 3.6.4
Description Mermaid diagrams are rendered with the securityLevel set to "loose", and the resulting SVG is injected into the DOM via innerHTML. This allows attacker-controlled javascript: URLs in Mermaid code blocks to be included in the rendered output. In desktop builds using Electron, windows are created with nodeIntegration enabled and contextIsolation disabled, which allows a stored cross-site scripting (XSS) attack to escalate to arbitrary code execution when a user opens a note containing a malicious Mermaid block and clicks the rendered diagram node.
Recommendations Update to version 3.6.4.

Exploit

Fix

RCE

Code Injection

XSS

Weakness Enumeration

Related Identifiers

CVE-2026-40322

Affected Products

Siyuan