Impact
The vulnerability is a stored cross‑site scripting flaw in SiYuan's CSS snippet rendering that allows an attacker to inject a payload containing a closing </style> tag, terminate the surrounding style element, and insert arbitrary JavaScript. The injected code runs in the Electron renderer process where nodeIntegration is enabled, enabling the attacker to call child_process modules and execute shell commands, thereby granting full remote code execution. This flaw also bypasses the user’s preference to disable JavaScript, allowing the CSS path to run even when JS is turned off, and it propagates to all devices that pull from a synced workspace once the attacker with write access plants the payload.
Affected Systems
The issue affects SiYuan personal knowledge management system releases before version 3.7.0, specifically all builds that use renderSnippet() to render CSS snippets in Electron desktop applications. Any user with write access to a synced workspace can upload the malicious snippet, making the flaw consequential for all participants who share that workspace.
Risk and Exploitability
The CVSS score of 9.9 marks this flaw as critical, and while EPSS is not available, the widespread use of SiYuan and the default node integration in Electron mean the exploitability is high. The flaw is not yet listed in the CISA KEV catalog, but the attack vector is local via a synced workspace; any device syncing the malicious snippet will execute the payload automatically, making the risk very high.
OpenCVE Enrichment