Summary
SiYuan's Markdown export can disclose the body text of documents that are hidden, disabled, or password-protected. An authenticated Reader may trigger this by exporting a public document that references a protected document, even without its publish password.
Affected context
The issue occurs in SiYuan's Markdown export flow when block-reference footnotes are resolved for a public document. SiYuan versions 3.6.0 before 3.8.10 are affected according to the provided description. Risk arises when an authenticated Reader can request export of a public document that references content whose visibility or password protections should restrict access.
Exploit preconditions
- Attack surface: Markdown export through the
copyStdMarkdownoperation - Required access: An authenticated Reader account
- Trigger point: Exporting a public document that contains a block reference to a protected document
- Why exploitation is possible: Footnote resolution may expose referenced document text without enforcing the referenced document's visibility or publish-password restrictions
Why this happens
The underlying issue is an authorization and information-exposure weakness mapped to CWE-200. During Markdown export, resolving a block reference can return content from a hidden, disabled, or password-protected document without applying the access checks that protect that content. The export path therefore exposes sensitive data through a reference to an otherwise public document.
Potential impact
- Protected document text may be disclosed to authenticated Readers
- Confidential information in hidden or disabled documents could be exposed
- Password protections may be bypassed through referenced content
- Organizations could face privacy, compliance, or confidentiality consequences
General mitigation guidance
Defensive patterns focus on enforcing authorization consistently wherever referenced content is retrieved or rendered.
- Apply the referenced document's access and password checks during export and reference resolution
- Use secure-by-default behavior that omits protected content unless the requester is explicitly authorized
- Minimize trust in document references as an indication that the referenced content is public
- Keep export operations within the same least-privilege access context as ordinary document viewing
- Avoid including sensitive document bodies in output when authorization cannot be confirmed
How teams detect issues like this
- Review export and block-reference resolution code for authorization checks applied to the referenced document, not just the source document
- Use static analysis or code review rules to flag content retrieval paths that lack access-control checks
- Test exports involving references to hidden, disabled, and password-protected documents using Reader-level accounts
- Enforce policies requiring authorization checks at each data-access boundary and verify that protected content is excluded from unauthorized responses

