Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-66395

CVE-2026-66395: SiYuan Desktop XSS Vulnerability

CVE-2026-66395 is a reflected cross-site scripting flaw in SiYuan desktop's bazaar plugin handler that allows attackers to execute arbitrary code via malicious deep links. This article covers technical details, affected versions, impact, and mitigation strategies.

Published:

CVE-2026-66395 Overview

CVE-2026-66395 is a reflected cross-site scripting vulnerability in SiYuan desktop versions before v3.7.2. The flaw resides in the bazaar plugin readme handler and is reachable through the siyuan:// deep link protocol. Attackers craft a malicious URL that injects HTML via the plugin name parameter. The payload is rendered with insertAdjacentHTML inside an insecurely configured Electron renderer, granting full Node.js access. This transforms a client-side scripting bug into arbitrary code execution on the victim host. The vulnerability is classified under [CWE-79] and affects the SiYuan note-taking desktop application.

Critical Impact

A single click on a crafted siyuan:// link triggers remote code execution with the privileges of the SiYuan desktop process on the target machine.

Affected Products

  • SiYuan desktop versions before v3.7.2
  • SiYuan bazaar plugin readme handler
  • Electron-based SiYuan renderer processes with Node.js integration

Discovery Timeline

  • 2026-07-27 - CVE-2026-66395 published to NVD
  • 2026-07-28 - Last updated in NVD database

Technical Details for CVE-2026-66395

Vulnerability Analysis

The vulnerability chains three weaknesses. First, SiYuan registers a custom siyuan:// protocol handler that accepts external input. Second, the bazaar plugin readme handler reflects the plugin name parameter into the DOM without sanitization. Third, the Electron renderer is configured with Node.js integration enabled, so any injected JavaScript can invoke require('child_process') and execute native commands. An attacker hosts a crafted link on a webpage or sends it via chat. When the victim clicks the link, the operating system launches SiYuan and passes the URL to the vulnerable handler. The reflected payload executes with the trust boundary of a local desktop application.

Root Cause

The root cause is insecure use of insertAdjacentHTML on attacker-controlled data combined with an Electron renderer that lacks context isolation and retains Node.js integration. Input from the siyuan:// protocol is treated as trusted and passed directly to a DOM sink. The bazaar handler does not encode or filter HTML entities in the plugin name parameter.

Attack Vector

Exploitation requires user interaction. The attacker delivers a malicious siyuan:// URL through phishing, a compromised website, or a messaging platform. When the user clicks the link, the browser hands off the URL to the registered SiYuan desktop application. The vulnerable readme handler parses the URL, reflects the plugin name into HTML, and the renderer evaluates the injected script. The payload can spawn shell commands, read local files, or install persistence. See the GitHub Security Advisory and the VulnCheck Security Advisory for technical details.

Detection Methods for CVE-2026-66395

Indicators of Compromise

  • Process creation events where the SiYuan desktop binary spawns unexpected child processes such as cmd.exe, powershell.exe, bash, or sh.
  • Outbound network connections initiated by the SiYuan renderer to non-SiYuan domains shortly after a siyuan:// protocol invocation.
  • Windows registry or shell history entries containing siyuan:// URLs with HTML tags or script payloads in the plugin name parameter.

Detection Strategies

  • Hunt in endpoint telemetry for parent-child process relationships where SiYuan launches script interpreters or system utilities.
  • Inspect browser and email logs for URLs matching the pattern siyuan:// with encoded <script>, <img>, or onerror payloads.
  • Correlate SiYuan process launches with subsequent file writes to persistence locations such as startup folders or ~/.config directories.

Monitoring Recommendations

  • Alert on any SiYuan renderer process making outbound connections to newly observed domains.
  • Log all custom protocol handler invocations on managed endpoints and review those containing HTML metacharacters.
  • Monitor installed SiYuan versions across the fleet and flag any host running a release earlier than v3.7.2.

How to Mitigate CVE-2026-66395

Immediate Actions Required

  • Upgrade SiYuan desktop to version v3.7.2 or later on all endpoints.
  • Inventory all systems where SiYuan is installed and prioritize patching of internet-connected user workstations.
  • Educate users to avoid clicking siyuan:// links from untrusted sources until patching is complete.

Patch Information

The vendor addressed the vulnerability in SiYuan desktop v3.7.2. The fix sanitizes input passed to the bazaar plugin readme handler and hardens rendering of plugin metadata. Refer to the GitHub Security Advisory GHSA-6gx2-8gcr-x83f for the release notes and commit references.

Workarounds

  • Unregister the siyuan:// protocol handler at the operating system level until the application is upgraded.
  • Block outbound execution of script interpreters spawned by the SiYuan process using application control policies.
  • Restrict SiYuan installation to users with a documented business need to reduce the attack surface.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.