SiYuan
CVE-2026-59833
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft note/README with javascript in form action or SVG xlink:href
-
DeliveryDeliver via shared document or Bazaar package
-
ExploitVictim opens export-preview or renders README
-
ExecutionSanitizer bypass fires stored XSS
-
PersistScript runs in Electron renderer
-
ImpactExecute arbitrary OS commands on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to actively open a poisoned render path - specifically SiYuan's document export-preview or a Bazaar package README render (CVSS UI:A). The payload must reach the victim via attacker-controlled content: a shared or imported note/document, or a Bazaar marketplace package the victim installs and views. The technical prerequisite is that the crafted HTML uses a form action attribute or an SVG xlink:href attribute carrying a javascript: scheme, which Lute's dangerous-scheme block fails to check. RCE (as opposed to mere script execution) is limited to the Electron desktop renderer, so it is users of that desktop build who process untrusted content who are affected; the requirement for victim interaction and attacker-supplied stored content is the primary factor limiting real-world exploitation. |
| Impact | The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H, base 8.6) reflects a network-reachable, low-complexity, unauthenticated payload with high confidentiality, integrity and availability impact, gated only by required user interaction (UI:A) - the victim must open an export-preview or render a Bazaar README. That user-interaction dependency is the single most important limiter and is why this is a serious-but-not-wormable issue: it is stored/persistent XSS delivered through content the target chooses to view, not a drive-by against an exposed service. No EPSS score, SSVC decision, KEV listing, or POC was provided in the input, so exploitation is currently theoretical from an intelligence standpoint (no public exploit identified). The realistic priority is elevated for anyone processing untrusted notes or installing community Bazaar packages, because the Electron renderer turns XSS into RCE; it is lower for isolated single-user instances that never import third-party content. Note the scope question: the vendor scored SC/SI/SA as N even though OS command execution occurs, treating the impact as within the vulnerable desktop application rather than a cross-system scope change - verify with the vendor advisory if scope matters for your scoring. |
| Exploit ScenarioDerived | An attacker crafts a SiYuan note or a Bazaar marketplace package whose README embeds a form action or SVG xlink:href carrying a javascript: payload that survives Lute sanitization. When a victim installs the package or opens the malicious document in export-preview, the payload executes in SiYuan's Electron renderer and runs OS commands on the victim's machine. No public exploit code is identified at time of analysis, and the low attack complexity means a working payload would be straightforward to build once the bypass is understood. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
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.
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.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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).
Know when Siyuan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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
DescriptionCVE.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.
Executive ViewAI
SiYuan versions before 3.7.1 contain a vulnerability in its Markdown rendering engine that enables arbitrary operating system code execution when users open crafted documents through previews or third-party packages; no public exploit has been identified at time of analysis, but the attack vector is straightforward enough that exploitation could occur. Any organization using SiYuan faces immediate risk of user machine compromise, with potential consequences including sensitive data exfiltration, malware installation, and network reconnaissance from affected user endpoints.
No vendor-released patch identified at time of analysis. Interim mitigations include: (1) Disable Bazaar package browser and third-party package installation; (2) Restrict document imports to pre-vetted internal sources; (3) Disable document preview and export rendering features; (4) Isolate SiYuan instances to restricted network segments or containers with minimal system access; (5) Implement endpoint detection to monitor for unexpected subprocess execution and outbound connections originating from SiYuan process.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role
Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,
SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr
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
Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB