Executive brief
SiYuan is a popular note-taking and knowledge management application that allows users to publish documents with optional password protection. An attacker can bypass these password protections by calling the graph API endpoints (`getGraph` and `getLocalGraph`) without providing a password, gaining access to the full text content and internal linking structure of all password-protected documents in the workspace. This is a serious confidentiality breach that affects anyone using SiYuan's publish feature with authentication disabled or as a reader.
Technical details
The vulnerability stems from missing authorization checks in the graph endpoint handlers. Both `getGraph` and `getLocalGraph` filter graph nodes using `FilterGraphByPublishIgnore()`, which only evaluates the visibility tier (checks the invisible-tier set) but contains no password evaluation logic. Password-protected documents are marked `Visible = true` and therefore pass the filter unchanged. Furthermore, graph nodes carry block-level content (not just titles), as `genTreeNodes()` sets `node.Title = node.Label = block.Content`. The endpoints are registered with `CheckAuth` only, making them reachable by any publish reader token or anonymous users when `Publish.Auth.Enable` is disabled. The attack requires no user interaction and no authentication beyond what is already granted to readers.
Affected products
- siyuan-note siyuan before 0.0.0-20260724091654-82e9ded423e4
Timeline
- 2026-07-24: disclosed: Published to GitHub Advisory Database
- 2026-09-03: advisory: GHSA-vpjw-wf5h-cgpq published