/

CVE-2026-74904

Severity:

HIGH RISK

(7.5)

Missing Authorization (CWE-862) in SiYuan Block API

CVE-2026-74904

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Information Disclosure

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 before v3.7.4 lacks authorization checks on multiple block metadata and content endpoints. An anonymous reader in publish mode may use these endpoints to disclose private block-derived text, structural metadata, or whether arbitrary blocks exist when the identifiers are known.

Affected context

The vulnerability occurs in SiYuan's block API handlers in kernel/api/block.go, including endpoints such as getRefText, checkBlockExist, and getBlockBreadcrumb. Deployments are at risk when publish-mode readers can reach these handlers and the endpoints rely on basic authentication without applying authorization checks that distinguish public content from private workspace data.

Exploit preconditions

  • Attack surface: HTTP block metadata and content endpoints exposed by the SiYuan service
  • Required access: Access as an anonymous publish-mode reader; valid authentication beyond that may not be required
  • Trigger point: Requests to affected endpoints using block identifiers
  • Why exploitation is possible: The handlers perform basic authentication checks but do not consistently enforce publish-access permissions before returning block-derived information

Why this happens

The underlying bug is a missing authorization decision in sensitive API handlers. Authentication establishes that a request can reach the service, but the affected endpoints do not adequately verify whether the requester is permitted to access the referenced block or its derived metadata. This maps to CWE-862: Missing Authorization, where access-control enforcement is omitted or insufficient for a protected resource.

Potential impact

  • Private block-derived text could be disclosed
  • Workspace structure and block relationships could be revealed
  • Attackers could determine whether arbitrary block identifiers exist
  • Exposed metadata could support targeted discovery of sensitive content
  • Privacy boundaries between published and private workspace data could be weakened

General mitigation guidance

Mitigation generally focuses on enforcing authorization at every endpoint that returns block content or metadata.

Common defensive patterns include:

  • Applying publish-access filtering before retrieving or returning block data
  • Centralizing authorization checks so individual handlers cannot omit them
  • Defaulting unclassified or inaccessible blocks to deny
  • Avoiding disclosure of existence information for unauthorized resources
  • Limiting service and workspace permissions according to least privilege
  • Testing anonymous and publish-mode access separately from authenticated workspace access

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code review rules requiring authorization checks on sensitive handlers
  • Reviews of routes that accept object or block identifiers
  • Endpoint matrices that compare authentication requirements with resource-level permissions
  • Integration tests for anonymous, publish-mode, and authorized workspace users
  • Policy checks ensuring private content and existence metadata are denied by default
  • Neutral automated security review tools that flag handlers returning protected data without an explicit authorization decision

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-4vpg-gwqq-w44c
vulncheck.comvulncheck.com/advisories/siyuan-before-missing-authorization-via-block-api

Frequently asked

questions

It may be exploitable remotely when the SiYuan service exposes the affected block endpoints to publish-mode readers and the attacker can send requests containing block identifiers.

The described issue permits anonymous publish-mode access because the affected handlers rely on basic authentication without sufficient publish-access filtering. Exact exposure depends on deployment and network controls.

Enforce resource-level authorization and publish-access checks in every affected handler before retrieving or returning block content or metadata.

Centralize access-control decisions, deny unauthorized resources by default, and maintain tests covering anonymous, published, and private workspace access paths.

Find out what's already
exploitable in your codebase.