/

CVE-2026-34453

Severity:

HIGH RISK

(7.5)

Authorization Logic Error in SiYuan Publish Bookmark API

CVE-2026-34453

Analyzed

Vulnerability type

Category:

Authorization Logic Error

CWE:

CWE-863

Impact:

Unauthorized Access to Protected Content

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SiYuan's publish service contains an authorization logic flaw that exposes bookmarked blocks from password-protected documents to unauthenticated users.

When the bookmark API is called in read-only publish mode with a nil context, the password check is skipped, allowing anyone who can reach the publish service to read content from documents marked as Protected if they contain at least one bookmark.

Affected context

This vulnerability affects SiYuan instances using the publish/read-only mode with documents configured as Protected and containing bookmarked blocks.

The issue arises specifically in the /api/bookmark/getBookmark endpoint, where the access-control filter assumes a nil request context is authorized and omits the publish password verification.

Environments that expose the publish service to untrusted networks or the public internet are at heightened risk of unauthorized data disclosure.

Exploit preconditions

  • Attack surface: HTTP API of the SiYuan publish service, particularly the /api/bookmark/getBookmark endpoint.
  • Required access: Network access to the publish service; no valid credentials or publish password are required.
  • Trigger point: An attacker invokes the bookmark retrieval API while the server is in publish/read-only mode and target documents have at least one bookmarked block.
  • Why exploitation is possible: The authorization filter FilterBlocksByPublishAccess(nil, ...) interprets a nil context as already authorized and bypasses the password protection check for Protected documents.

Why this happens

The core issue is an authorization logic error where the system incorrectly treats the absence of an authentication/authorization context as equivalent to a trusted, authorized state.

In the affected code path, the filter function responsible for enforcing publish-time access control is invoked with a nil context, which leads it to skip the password verification for Protected documents.

This maps to CWE-863: Incorrect Authorization, where the system fails to correctly enforce access rules on a protected resource, resulting in confidential content being returned to unauthorized callers.

Potential impact

  • Unauthorized reading of content from password-protected documents that contain bookmarked blocks
  • Exposure of sensitive notes, personal records, or confidential knowledge base entries
  • Leakage of internal project information, credentials, or other secrets inadvertently stored in Protected documents
  • Erosion of user trust due to perceived confidentiality guarantees not being honored

General mitigation guidance

Mitigation generally centers on ensuring that authorization checks are consistently enforced and cannot be bypassed through special or default contexts.

Recommended defensive patterns include:

  • Treating a missing or nil security context as unauthenticated by default, requiring explicit validation before granting access
  • Centralizing authorization decisions in a unified access-control layer rather than duplicating checks in individual endpoints
  • Applying explicit checks for document protection state (e.g., Protected vs. public) on all read paths, including bookmark and search features
  • Designing APIs such that every request path must successfully pass both authentication and authorization stages before content retrieval
  • Using secure defaults where any ambiguity in context or user identity results in denial of access rather than implicit allow

How teams detect issues like this

Organizations can detect similar authorization flaws through a combination of design review, testing, and automated analysis:

  • Code review: Examine all entry points to protected content (bookmarks, search, previews, exports) to confirm they invoke a common authorization routine and do not special-case nil or anonymous contexts as authorized.
  • Static analysis: Configure rules to flag authorization checks that depend on nullable context objects, or that bypass checks when context is nil or missing.
  • Security testing: Perform access-control testing against the publish/read-only endpoints to verify that Protected resources are not accessible without valid credentials or passwords.
  • Policy enforcement: Use automated code scanning in CI to require explicit authorization calls on any API handler that returns document content or metadata that could be sensitive.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/issues/17246
github.comgithub.com/siyuan-note/siyuan/releases/tag/v3.6.2
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-c77m-r996-jr3q

Frequently asked

questions

Yes. Anyone with network access to the exposed SiYuan publish service can attempt to retrieve bookmarked content from Protected documents, without needing the publish password, as long as the vulnerable code path is active.

No. The flaw lies in the handling of a nil authorization context, which causes the system to treat unauthenticated requests as authorized for the bookmark retrieval API in publish/read-only mode.

The robust fix pattern is to centralize and enforce authorization logic for all content retrieval operations, ensuring that any missing or nil context is treated as unauthenticated and that Protected resources always require explicit verification (e.g., password or authenticated session) before access is granted.

Prevention typically involves adopting secure-by-default authorization semantics (deny by default), using a shared access-control layer for all resource access, adding automated tests for Protected vs. public resource behavior, and integrating static analysis or linting rules that detect code paths where authorization is conditional on nullable or optional context values.

Find out what's already
exploitable in your codebase.