Critical SiYuan Stored XSS Flaw Enables RCE in Electron Desktop Client
Vulnerability Disclosure · 3 sources · Updated 5mo ago · First seen Jun 24, 2026

SiYuan disclosed a critical stored cross-site scripting vulnerability that can escalate to remote code execution in its Electron desktop client. The flaw affects versions prior to 3.7.0 and stems from unsafe HTML rendering in attribute-view cells, including the genAVValueHTML() function and asset cell handling, where attacker-controlled content in text, URL, phone, and asset fields is inserted into innerHTML without proper escaping. Researchers said the issue can be triggered when a victim opens a note, loads the block-attribute panel for a crafted row, or in some cases hovers over malicious content that is re-rendered through tooltip HTML.
The impact is amplified by insecure Electron settings, notably nodeIntegration: true and contextIsolation: false, which allow injected JavaScript to reach Node.js APIs and execute system commands. Malicious payloads can be stored unchanged in workspace attribute-view JSON data, then spread through normal sync or collaborative workflows and execute on other devices that render the affected content. The vulnerability is tracked as CVE-2026-54158, carries a CVSS 9.9 rating, and has been fixed in SiYuan 3.7.0; advisories recommend upgrading and applying stronger output encoding and safer Electron hardening to prevent similar XSS-to-RCE chains.


