Executive brief
SiYuan is a note-taking and knowledge management application available as both a web application and Electron desktop app. Versions 3.7.0 through 3.8.3 contain a stored XSS vulnerability in gallery and kanban view renderers that fails to escape field descriptions. On the Electron desktop app, this vulnerability can be exploited to execute arbitrary system commands with user privileges by injecting malicious JavaScript that accesses Node.js APIs.
Technical details
The vulnerability exists in gallery and kanban row renderers (row.ts:114 and row.ts:183) which interpolate unescaped field description values into aria-label attributes without calling escapeAriaLabel(), unlike other parts of the codebase. The generated HTML is then inserted via innerHTML, allowing an attacker to break out of the attribute context and inject script tags. In the Electron desktop app with nodeIntegration enabled and contextIsolation disabled, injected JavaScript can call Node.js child_process APIs to execute arbitrary commands. The malicious payload can be stored via database import, shared workspace, template, or API and executes automatically when the affected card is rendered, requiring no user interaction beyond viewing the card.
Affected products
- SiYuan SiYuan 3.7.0 to 3.8.3
Timeline
- 2026-09-26: disclosed
- 2026-09-26: patched: Version 3.8.4 released