Executive brief
SiYuan, a personal knowledge management system, is vulnerable to a zero-click attack that can steal user credentials. By simply viewing a note containing a specially crafted diagram, a user's Windows login hash can be sent to an attacker. This could lead to unauthorized access to the user's account or corporate network.
Technical details
SiYuan initializes Mermaid.js with 'securityLevel: loose' and 'htmlLabels: true', which allows <img> tags to persist in the rendered SVG output. The resulting SVG is injected into the DOM via innerHTML without secondary sanitization. Because the Electron client has web security disabled, protocol-relative URLs (e.g., //attacker.com) are resolved as UNC paths on Windows. When a victim views a malicious diagram, Windows automatically attempts SMB authentication, leaking NTLMv2 hashes to the attacker. On other platforms, this facilitates blind SSRF and IP disclosure. The vulnerability is patched in version 0.0.0-20260407035653-2f416e5253f1.
Affected products
- siyuan-note SiYuan < 0.0.0-20260407035653-2f416e5253f1
Timeline
- 2026-04-09: disclosed
- 2026-04-09: patched
- 2026-04-10: advisory