Skip to content
Threat Feed
critical advisory

CVE-2026-66395 - SiYuan Desktop Reflected XSS to RCE

A reflected cross-site scripting (XSS) vulnerability exists in SiYuan desktop applications before version 3.7.2, specifically within the bazaar plugin readme handler, allowing attackers to execute arbitrary code by crafting a malicious 'siyuan://' deep link, which leads to Remote Code Execution (RCE) with full Node.js access due to insecure Electron renderer configuration.

CVE-2026-66395 details a critical reflected cross-site scripting (XSS) vulnerability impacting SiYuan desktop versions prior to 3.7.2. This flaw, residing in the bazaar plugin readme handler, enables an attacker to achieve Remote Code Execution (RCE). The attack vector involves crafting a malicious siyuan:// deep link that embeds an HTML payload within the plugin name parameter. When a user is persuaded to open this link, the SiYuan application, built on Electron, processes the URL. Due to an insecure configuration of its Electron renderer, the malicious HTML is rendered via insertAdjacentHTML, granting the attacker full Node.js access and the ability to execute arbitrary code on the victim's system. This vulnerability poses a significant threat, as it can lead to complete system compromise if exploited.

Attack Chain

  1. Attacker crafts a malicious siyuan:// deep link, embedding an XSS payload within the plugin name parameter.
  2. The crafted deep link is delivered to a victim, typically via social engineering tactics such as email or chat messages.
  3. The victim is enticed to click or open the malicious deep link.
  4. The operating system's deep link handler invokes the installed SiYuan desktop application to process the siyuan:// URL.
  5. The SiYuan application processes the URL, passing the malicious plugin name parameter to the bazaar plugin readme handler.
  6. The readme handler renders the crafted HTML payload using insertAdjacentHTML within an insecurely configured Electron renderer process.
  7. The embedded JavaScript within the HTML payload executes with full Node.js privileges, allowing the attacker to run arbitrary code on the victim's system.
  8. This results in Remote Code Execution (RCE), enabling further compromise such as data exfiltration, installation of malware, or establishing persistence.

Impact

Successful exploitation of CVE-2026-66395 grants an attacker Remote Code Execution (RCE) capabilities on the victim's system. This can lead to severe consequences, including full control over the compromised machine, sensitive data theft, privilege escalation, and deployment of additional malicious payloads like ransomware or backdoors. While specific victim counts or targeted sectors are not detailed in the source, any user of SiYuan desktop applications running a vulnerable version is at risk, across all operating systems where the application is deployed (Windows, Linux, macOS). The high CVSS score of 9.6 reflects the critical nature of this vulnerability.

Recommendation

  • Patch CVE-2026-66395 immediately by updating SiYuan desktop to version 3.7.2 or later on all affected Windows, Linux, and macOS systems.
  • Deploy the provided Sigma rule "Detect Suspicious Child Process from SiYuan Desktop" to your SIEM and tune for your environment to identify potential RCE attempts originating from the SiYuan application.
  • Monitor process creation events for SiYuan.exe (or siyuan on Linux/macOS) spawning unusual child processes such as command shells or scripting interpreters, as outlined in the Sigma rule.
  • Educate users about the dangers of opening deep links from untrusted or suspicious sources, especially those that appear to invoke siyuan:// protocol.

Detection coverage 1

Detect Suspicious Child Process from SiYuan Desktop

critical

Detects CVE-2026-66395 exploitation - Attempts to detect suspicious process execution originating from the vulnerable SiYuan desktop application, indicating potential RCE via deep link XSS.

sigma tactics: execution techniques: T1059, T1059.001, T1059.003, T1059.004, T1204.001 sources: process_creation, windows

Detection queries are available on the platform. Get full rules →

Indicators of compromise

2

url

TypeValue
urlhttps://github.com/siyuan-note/siyuan/security/advisories/GHSA-6gx2-8gcr-x83f
urlhttps://www.vulncheck.com/advisories/siyuan-desktop-before-reflected-xss-to-rce-via-siyuan-protocol