Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2026-40322— SiYuan: Mermaid `javascript:` Link Injection Leads to Stored XSS and Electron RCE

CVSS 9.1 · Critical EPSS 0.05% · P15
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-40322

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
SiYuan: Mermaid `javascript:` Link Injection Leads to Stored XSS and Electron RCE
Source: NVD (National Vulnerability Database)
Vulnerability Description
SiYuan is an open-source personal knowledge management system. In versions 3.6.3 and below, Mermaid diagrams are rendered with 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 survive into the rendered output. On desktop builds using Electron, windows are created with nodeIntegration enabled and contextIsolation disabled, escalating the stored XSS to arbitrary code execution when a victim opens a note containing a malicious Mermaid block and clicks the rendered diagram node. This issue has been fixed in version 3.6.4.
Source: NVD (National Vulnerability Database)
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Source: NVD (National Vulnerability Database)
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: NVD (National Vulnerability Database)
Vulnerability Title
SiYuan 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
SiYuan是SiYuan开源的一个隐私至上的个人知识管理系统。 SiYuan 3.6.3及之前版本存在安全漏洞,该漏洞源于Mermaid图表以宽松安全级别渲染,且生成的SVG通过innerHTML注入DOM,允许攻击者控制的javascript: URL在渲染输出中保留,在桌面Electron构建中可能将存储型跨站脚本升级为任意代码执行。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Shenlong Deep Dive — AI Deep Analysis

10-question deep dive: root cause, exploitation, mitigation, urgency. Read summary free, full version requires login.

Affected Products

VendorProductAffected VersionsCPESubscribe
siyuan-notesiyuan < 3.6.4 -

II. Public POCs for CVE-2026-40322

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-40322

登录查看更多情报信息。

Same Patch Batch · siyuan-note · 2026-04-16 · 4 CVEs total

CVE-2026-403188.5 HIGHSiYuan: Publish Reader Path Traversal Delete via `removeUnusedAttributeView`
CVE-2026-402598.1 HIGHSiYuan: Publish Reader Can Arbitrarily Delete Attribute View Files via removeUnusedAttribu
CVE-2026-40922SiYuan: Incomplete sanitization of bazaar README allows stored XSS via iframe srcdoc (inco

IV. Related Vulnerabilities

V. Comments for CVE-2026-40322

No comments yet


Leave a comment