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
- Attacker crafts a malicious
siyuan://deep link, embedding an XSS payload within theplugin nameparameter. - The crafted deep link is delivered to a victim, typically via social engineering tactics such as email or chat messages.
- The victim is enticed to click or open the malicious deep link.
- The operating system's deep link handler invokes the installed SiYuan desktop application to process the
siyuan://URL. - The SiYuan application processes the URL, passing the malicious
plugin nameparameter to the bazaar plugin readme handler. - The
readmehandler renders the crafted HTML payload usinginsertAdjacentHTMLwithin an insecurely configured Electron renderer process. - 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.
- 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(orsiyuanon 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
criticalDetects CVE-2026-66395 exploitation - Attempts to detect suspicious process execution originating from the vulnerable SiYuan desktop application, indicating potential RCE via deep link XSS.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
2
url
| Type | Value |
|---|---|
| url | https://github.com/siyuan-note/siyuan/security/advisories/GHSA-6gx2-8gcr-x83f |
| url | https://www.vulncheck.com/advisories/siyuan-desktop-before-reflected-xss-to-rce-via-siyuan-protocol |