SiYuan Desktop Notification XSS Vulnerability Leading to Remote Code Execution

Vulnerability

A vulnerability in SiYuan desktop versions prior to 3.6.5 allows for cross-site scripting (XSS) in notifications, which can be exploited to execute arbitrary code on the user's desktop. The issue arises because the application renders notification messages as raw HTML in an Electron environment with Node integration enabled, context isolation disabled, and web security turned off. This configuration allows injected JavaScript to access Node APIs and escalate to remote code execution.

Impact

Exploitation of this vulnerability allows for arbitrary command execution on the desktop, with potential access to local notes, secrets, and stored tokens or credentials. It also enables persistence by writing files into the user profile or workspace.

Reproduction

To reproduce this vulnerability, upload a payload to the notification API that includes JavaScript code. The payload will be inserted into the DOM as HTML, executing the JavaScript in the Electron renderer. Since Node integration is enabled, the injected code can access local OS functionality, such as executing commands or opening applications like the calculator.

Remediation

Users can update to SiYuan version 3.6.5 or later to address this vulnerability.

Added: Apr 24, 2026, 8:54 PM
Updated: Apr 24, 2026, 8:54 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
7.5
exploitability
3.8
remediation
7.7
relevance
6.7
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.