SiYuan
CVE-2026-59833
HIGH
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-delivered stored XSS needs no privileges (PR:N) but requires the victim to open a render path (UI:R); Electron OS command execution gives high C/I/A within the app (S:U, matching vendor SC:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
SiYuan is an open-source personal knowledge management system. Prior to 3.7.1, SiYuan renders note and package content to HTML through the Lute engine with sanitization enabled, but Lute's dangerous javascript scheme block does not check form action or SVG xlink:href attributes, allowing stored cross-site scripting in document export-preview and Bazaar package README render paths that can execute OS commands in the Electron desktop renderer. This issue is fixed in versions 3.7.1.
AnalysisAI
Stored cross-site scripting in SiYuan before 3.7.1 escalates to OS command execution inside the Electron desktop renderer because the bundled Lute Markdown/HTML engine sanitizes content but fails to block dangerous javascript schemes in form action and SVG xlink:href attributes. An attacker who plants crafted content that a victim later opens via document export-preview or a Bazaar package README render can run arbitrary code on the victim's machine. There is no public exploit identified at time of analysis, and it is not on CISA KEV; the CVSS 4.0 base score is 8.6.
Technical ContextAI
SiYuan is a self-hosted, Electron-based personal knowledge management application that converts Markdown notes and marketplace (Bazaar) package content into HTML using the Lute engine with sanitization enabled. The flaw is a CWE-79 (Improper Neutralization of Input During Web Page Generation) sanitizer bypass: Lute's routine that strips dangerous javascript: schemes does not inspect the action attribute of form elements or the xlink:href attribute of SVG elements, so script payloads survive sanitization. Because the rendered HTML is displayed inside the Electron/Chromium renderer - which, unlike a sandboxed browser tab, can reach Node/OS integration in a desktop app - the resulting stored XSS can pivot from in-page script execution to operating-system command execution. The affected component is identified in CPE as cpe:2.3:a:siyuan-note:siyuan:*:*:*:*:*:*:*:* (all versions prior to 3.7.1).
RemediationAI
Upgrade to SiYuan v3.7.1 or later, which contains the Lute sanitization fix (Vendor-released patch: 3.7.1); the corrective change is commit ebe252e61fb93f258d083b9da0fa403679fdf94a and the advisory is GHSA-97xv-3v84-h358. Until upgrading, reduce exposure by not importing or previewing notes and documents from untrusted sources and by avoiding installation of Bazaar packages of unknown provenance, since these are the exact render paths that execute the payload - the trade-off is loss of the preview/marketplace convenience for content you cannot vouch for. Because the escalation to OS command execution depends on the Electron renderer, disabling or refraining from Bazaar package installation removes the marketplace README vector but not the general export-preview vector, so prompt upgrade to 3.7.1 remains the only comprehensive fix.
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
Reflected XSS in SiYuan knowledge management before 3.5.9.
SiYuan knowledge management system prior to 3.5.5 has a path traversal in /api/file/copyFile allowing arbitrary file ope
SiYuan version 3.0.3 allows executing arbitrary commands on the server. Rated critical severity (CVSS 9.0), this vulnera
SQL injection in SiYuan prior to version 3.6.0 allows any authenticated user, including those with read-only access, to
Cross-site scripting (XSS) in SiYuan personal knowledge management system versions 3.6.0-3.6.1 allows remote attackers t
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today