Executive brief
SiYuan, a personal knowledge management and note-taking application, is vulnerable to a security flaw that allows attackers to execute malicious code on a user's computer. By sharing or syncing a specially crafted note containing a database table, an attacker can gain full control over the victim's system, including the ability to read all private notes, access local files, and steal credentials. This occurs automatically when the victim opens the malicious note or simply hovers their mouse over a specific part of it.
Technical details
A stored XSS vulnerability exists in SiYuan's Attribute View (database) component due to insufficient sanitization of asset cell content. The application fails to escape user-provided input in 'app/src/protyle/render/av/cell.ts' and 'app/src/protyle/render/av/blockAttr.ts', leading to direct XSS on page load or hover-triggered XSS via the 'aria-label' attribute. Because the Electron desktop client is configured with 'nodeIntegration: true' and 'contextIsolation: false', an attacker can leverage this XSS to access Node.js APIs like 'child_process' and achieve full Remote Code Execution (RCE). The vulnerability is a result of an incomplete fix for a previous issue, where some renderers were updated but others were missed. A patch is available in version 0.0.0-20260628153353-2d5d72223df4.
Affected products
- siyuan-note SiYuan <= 3.6.5
Timeline
- 2026-06-03: disclosed: Vulnerability reported to vendor
- 2026-06-24: advisory: NVD publication date
- 2026-06-28: patched: First patched version released
- 2026-07-10: advisory: GitHub Advisory published