CVE-2026-40322: b3log siyuan Cross-site Scripting
Vulnerability summary
CVE-2026-40322 is a critical (CVSS 9.1) Cross-site Scripting vulnerability in b3log siyuan. EPSS estimates a 0.53% chance of exploitation in the next 30 days, higher than 43.3% of scored vulnerabilities.
Timeline
- 16-04-2026PublishedVulnerability first disclosed.
- 17-04-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST9.0CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:HDiffers
EPSS trend
Probability
0.53%
Chance of exploitation in the next 30 days
Percentile
43%
Versus all other CVEs
30-day change
+0.22 pp
From 0.31% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-79Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-94Improper Control of Generation of Code ('Code Injection')The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Affected systems
2 vendors · 2 products
References
2 links- github.com/siyuan-note/siyuan/security/advisories/GHSA-x63q-3rcj-hhp5X Refsource CONFIRMThird Party Advisory