Summary
SiYuan may fail to enforce authorization and row-level filtering when rendering attribute views that reference related databases. An anonymous reader could retrieve Relation or Rollup cell contents from hidden or password-protected databases through a published database, potentially exposing sensitive information.
Affected context
The issue occurs in SiYuan deployments where published databases contain relations to restricted databases and their content is rendered through attribute views. It may also arise when row-filtering logic assumes that the first database column is a block-type column, allowing filtering to be bypassed when that assumption does not hold.
Exploit preconditions
- Attack surface: Published SiYuan database and attribute-view rendering functionality
- Required access: Anonymous reader access to a published database; no access to the related restricted database is necessarily required
- Trigger point: Rendering or requesting Relation and Rollup cells associated with restricted database content
- Why exploitation is possible: Authorization and row-filtering checks may not be consistently applied to related-database values or to views whose first column is not a block-type column
Why this happens
The underlying bug is an incomplete authorization check in database-view rendering. The application exposes derived Relation or Rollup content without reliably verifying whether the requesting user is permitted to access the source database and its rows. This maps to CWE-862: Missing Authorization, where a security-relevant operation or data access path lacks an effective permission check.
Potential impact
- Anonymous users may access sensitive Relation or Rollup cell contents
- Hidden or password-protected database information could be disclosed
- Row-level visibility restrictions may be bypassed
- Published content could reveal metadata or records from restricted sources
- Exposed information could support further unauthorized access or targeted attacks
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every data-retrieval boundary, including derived and related-database values.
Common defensive patterns include:
- Authorizing access to the source database and individual rows before returning Relation or Rollup content
- Applying row-level filtering independently of column order or block-type assumptions
- Treating published views as untrusted access surfaces rather than trusted projections
- Using deny-by-default behavior when a referenced database or row cannot be authorized
- Minimizing sensitive data included in derived fields exposed to anonymous readers
- Testing authorization consistently across direct, related, aggregated, and cached representations
How teams detect issues like this
Organizations can look for missing-authorization patterns through:
- Static analysis and code review of database rendering paths that return related or aggregated values
- Tests that compare anonymous, authenticated, and privileged responses for the same published view
- Regression cases covering hidden databases, password-protected databases, non-block first columns, and row-level filters
- Policy checks requiring authorization before dereferencing related records
- Response monitoring for restricted database identifiers or values appearing in public API results
- Automated application-security testing that exercises published views across varied column layouts and permission states

