/

CVE-2026-104410

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-862) in SiYuan Preview Endpoint

CVE-2026-104410

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

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 contains an authorization weakness in the /api/export/preview endpoint that may allow public readers to view data from password-protected or publication-disabled database rows.

When a public document embeds a database view, an attacker may obtain primary-key text and cell values from rows that should not be exposed.

Affected context

The issue may occur in SiYuan deployments where:

  • A document is publicly readable
  • The document embeds a database view
  • The database contains password-protected or publication-disabled rows
  • The export preview endpoint does not enforce the same visibility restrictions as the underlying database

Exposure depends on how public publishing, database permissions, and preview processing are configured.

Exploit preconditions

  • Attack surface: The /api/export/preview application endpoint
  • Required access: Ability to access a publicly available document containing a database view
  • Trigger point: Generation of an export preview for the public document
  • Why exploitation is possible: Authorization checks for protected or unpublished database rows may not be consistently applied during preview generation

Why this happens

The underlying bug is an authorization enforcement failure mapped to CWE-862: Missing Authorization.

The preview-processing path appears to rely on document visibility while failing to independently verify row-level protections and publication status. This creates an insecure pattern in which data is included in an export-related response without confirming that the requesting user is authorized to view each referenced row or cell.

Potential impact

  • Unauthorized disclosure of protected database rows
  • Exposure of primary-key text and cell values
  • Leakage of information from unpublished content
  • Privacy, confidentiality, or competitive-impact consequences
  • Increased risk of correlating exposed records with other public data

General mitigation guidance

Mitigation generally focuses on enforcing authorization at every data access boundary, including export and preview features.

Common defensive patterns include:

  • Applying row-level and field-level authorization checks during preview generation
  • Treating publication status and password protection as mandatory access controls
  • Returning only data that the requesting principal is explicitly allowed to view
  • Using secure-by-default behavior that excludes protected rows from public exports
  • Reducing trust in document visibility as a substitute for database authorization
  • Avoiding disclosure of identifiers or cell values when authorization cannot be established
  • Applying least privilege to service accounts and preview-generation components
  • Testing access-control behavior consistently across normal views, exports, previews, and APIs

How teams detect issues like this

High-level detection approaches include:

  • Static analysis and code review for export or preview handlers that access database records without centralized authorization checks
  • Review signals such as filtering only by document visibility while omitting row-level publication or password conditions
  • Automated tests that compare normal database access decisions with export-preview responses
  • Dynamic testing using public documents containing protected and unpublished records
  • Monitoring preview endpoints for unusual requests involving public documents with embedded database views
  • Policy enforcement requiring authorization checks before serialized data enters export or rendering pipelines

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-778g-gq49-fxxj
vulncheck.comvulncheck.com/advisories/siyuan-before-3.8.5-information-disclosure-via-api-export-preview

Frequently asked

questions

It may be exploitable remotely when the affected SiYuan instance exposes public documents and the preview endpoint is reachable by unauthenticated or low-privilege readers.

Not necessarily. The relevant prerequisite is access to a public document containing a database view; deployment-specific publishing and authentication settings determine whether an account is required.

Enforce row-level and field-level authorization during export-preview processing, and exclude password-protected or publication-disabled data unless the requester is explicitly authorized.

Test every alternate data-delivery path, including previews and exports, against the same authorization policy used by normal database views. Use centralized access-control checks and include protected-data cases in automated security testing.

Find out what's already
exploitable in your codebase.