Summary
SiYuan's asset APIs can expose indexed text for confidential assets referenced only by rows with publishing disabled. An anonymous attacker may retrieve that text when the relevant document is publicly accessible and the host exposes the affected endpoints.
Affected context
The issue affects SiYuan 3.8.0 before 3.8.10 when a public host document contains attribute-view rows that reference assets while publishing is disabled for those rows. The asset path may be exposed through /api/asset/getDocAssets, and the indexed text may then be available through /api/search/getAssetContentByPath.
Exploit preconditions
- Attack surface: The SiYuan asset and search API endpoints are reachable on a public host.
- Required access: No authentication is required, according to the vulnerability description.
- Trigger point: Requests to the document-assets endpoint and then the asset-content-by-path endpoint.
- Why exploitation is possible: Authorization checks do not adequately prevent anonymous access to indexed content for assets referenced only by publish-disabled rows.
Why this happens
The underlying issue is incorrect authorization, mapped to CWE-863. The application does not consistently enforce the publishing visibility policy when resolving asset paths and returning indexed asset text. As a result, data excluded from publication may still be accessible through related API operations.
Potential impact
- An attacker may discover paths to assets intended to remain unpublished.
- An attacker could retrieve indexed text containing confidential information.
- Exposure may affect the confidentiality of documents or data referenced by those assets.
General mitigation guidance
Defensive approaches focus on enforcing access decisions consistently across asset discovery and content retrieval.
- Apply authorization and publication-visibility checks at every API endpoint that returns asset metadata or content.
- Treat asset paths and indexed content as sensitive; do not rely on obscurity of paths as an access control.
- Use secure-by-default publication settings and require explicit authorization before returning content.
- Minimize stored or indexed sensitive data, and restrict service privileges to the data required for operation.
How teams detect issues like this
Review API handlers and shared asset-resolution code for authorization checks that may be skipped when content is reached through an indirect reference. Use static analysis and code review to trace whether publication and access policies are enforced on both asset listing and content retrieval paths. Test anonymous access to unpublished assets in controlled environments, and use policy checks to ensure sensitive content endpoints require an explicit authorization decision.

