CVE-2026-93922 in SiYuan
Summary
by MITRE • 09/19/2026
SiYuan through 3.8.4 renders notebook names as raw HTML in the Daily Note picker dialog without escaping, allowing stored cross-site scripting in the Electron renderer. Attackers can create notebooks with HTML payloads in names that execute JavaScript with Node.js access when the picker opens, enabling operating system command execution.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 09/19/2026
The vulnerability identified in SiYuan versions through 3.8.4 represents a critical security flaw rooted in improper input validation and output encoding within the application's user interface components. Specifically, the Daily Note picker dialog fails to properly sanitize notebook names before rendering them as HTML content. This lack of escaping allows an attacker who has write access to create or modify notebooks with maliciously crafted names containing raw HTML tags and JavaScript payloads. When a victim opens this specific dialog to select a daily note, the browser engine responsible for rendering the interface interprets these unescaped strings not as plain text but as executable code. This behavior constitutes a stored cross-site scripting vulnerability because the malicious payload is persistently stored within the application's data structure rather than being injected via transient input fields during a single session.
From a technical perspective, this flaw exploits the trust relationship between the local file system and the web-based rendering engine of the Electron framework. SiYuan utilizes an Electron architecture where parts of the user interface are rendered using HTML and JavaScript, similar to a standard web browser but with elevated privileges due to Node.js integration. By injecting script tags into notebook names that appear in the picker dialog, an attacker can trigger code execution within this privileged context. The impact is severe because the executed JavaScript operates with full access to the underlying operating system via Node.js APIs. This means that arbitrary commands can be issued on the host machine, potentially leading to complete compromise of the user's device, data exfiltration, or installation of persistent malware without any additional interaction from the victim beyond opening the affected dialog.
The operational impact extends beyond simple script execution in a sandboxed environment. Because the vulnerability allows for operating system command execution, it effectively bypasses many traditional web security boundaries that rely on same-origin policies to limit damage. An attacker can read sensitive files stored locally by SiYuan or other applications, modify existing data structures within the note-taking application, and potentially use the compromised machine as a pivot point for further network attacks. The persistence of this vulnerability is particularly dangerous because it does not require social engineering tricks like phishing links; instead, it relies on the victim simply navigating their own file structure to open a notebook with a malicious name, which could be planted by another user in shared workspaces or through compromised backup files if synchronization features are enabled.
This incident aligns closely with Common Weakness Enumeration (CWE) categories such as CWE-79 Improper Neutralization of Input During Web Page Generation Cross-site Scripting and CWE-1021 Improper Restriction of Rendered UI Layers or Frames, which often lead to clickjacking but in this context facilitates code execution. Furthermore, the exploitation technique maps directly to MITRE ATT&CK tactics involving Execution via Command and Scripting Interpreter, specifically leveraging local system privileges through client-side script injection. The ability to execute OS commands places this vulnerability at a high severity level within standard scoring systems due to its potential for full system compromise.
Mitigation strategies must focus on both immediate remediation and long-term architectural improvements. Users should immediately upgrade SiYuan to version 3.8.5 or later where the rendering logic has been patched to properly escape HTML entities in notebook names before they are inserted into the DOM. For organizations deploying this software, it is advisable to audit existing notebooks for any suspicious naming conventions that might indicate prior exploitation attempts. Additionally, developers should implement strict Content Security Policy (CSP) headers even within Electron applications to restrict inline script execution and disable Node.js integration in renderer processes where possible, thereby reducing the attack surface regardless of input sanitization efforts. Regular security audits focusing on data binding practices are essential to prevent similar vulnerabilities from emerging in other parts of the application interface.