/

CVE-2026-134246

Severity:

HIGH RISK

(7.5)

Missing Authorization (CWE-862) in SiYuan getDOMText API

CVE-2026-134246

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized disclosure of cached OCR text

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 /api/block/getDOMText endpoint can return cached OCR text for a referenced image without checking whether the caller is authorized to access that image. When publish authentication is disabled, an anonymous visitor who knows the path to an unpublished, non-encrypted asset may be able to retrieve its OCR text.

Affected context

The issue affects SiYuan releases described as 3.6.0 before 3.6.2 and 3.7.3 before 3.8.10. It occurs in the /api/block/getDOMText endpoint, which renders caller-supplied DOM that can reference image paths. The reported exposure depends on publish authentication being disabled and the referenced asset being unpublished, non-encrypted, and already associated with cached OCR text.

Exploit preconditions

  • Attack surface: The /api/block/getDOMText endpoint
  • Required access: No authentication is required when publish authentication is disabled; the caller must know a qualifying asset path.
  • Trigger point: The endpoint processes caller-supplied DOM containing a reference to that asset.
  • Why exposure is possible: The endpoint does not check publish access for referenced image paths before returning cached OCR text.

Why this happens

The endpoint processes caller-supplied DOM and resolves referenced image paths without applying the access-control checks required for published content. This is a missing authorization check, mapped to CWE-862: Missing Authorization. The underlying insecure pattern is allowing a resource to be accessed through an indirect reference without verifying that the requester is permitted to view it.

Potential impact

  • An anonymous visitor may retrieve cached OCR text associated with a known unpublished, non-encrypted asset.
  • Sensitive information captured in that OCR text could be disclosed.
  • The exposure may undermine confidentiality expectations for content not intended for publication.

General mitigation guidance

Defensive patterns focus on enforcing authorization consistently at the point where referenced resources are resolved.

  • Check publish access for every referenced asset before returning content derived from it.
  • Apply the same access policy to cached OCR results as to the underlying asset.
  • Treat caller-supplied DOM and resource paths as untrusted, and resolve references only through controlled, validated mechanisms.
  • Prefer secure-by-default publishing settings and avoid exposing content when authentication is disabled unless access is explicitly intended.
  • Limit the data returned by the endpoint to the minimum required and ensure the service operates with only necessary privileges.

How teams detect issues like this

  • Use static analysis and code review to find endpoint handlers that resolve caller-supplied resource paths without an authorization check.
  • Review whether access checks are performed before cached or derived content is returned, including OCR results.
  • Test requests involving unpublished assets under both authenticated and unauthenticated publishing configurations.
  • Enforce policies requiring authorization checks for every resource lookup and cache retrieval.
  • Automated security review tools may help identify missing checks in request-handling paths.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/commit/0432ef213d112e5ace886963f8e57fdf348c76c5
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-vmvr-gf8m-x483
vulncheck.comvulncheck.com/advisories/siyuan-3.6.0-before-3.6.2-and-3.7.3-before-3.8.10-missing-authorization-in-getdomtext-exposes-cached-ocr-text

Frequently asked

questions

The endpoint can be reached by visitors when publish authentication is disabled. Exposure additionally depends on the caller knowing a qualifying asset path and the asset having cached OCR text.

Not when publish authentication is disabled, according to the vulnerability description. The attacker still needs to reference a known unpublished, non-encrypted asset path.

Authorize access to each referenced asset before returning its content or any derived data, including cached OCR text.

Treat caller-supplied resource references as untrusted, enforce access checks consistently across direct and cached retrieval paths, and test unauthenticated access to unpublished content.

Find out what's already
exploitable in your codebase.