CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-72799

CVE-2026-72799: Missing Authorization in SiYuan Filetree Path-Resolution API

Alon Barad
Alon Barad
Software Engineer

Sep 5, 2026·7 min read·1 visit

Executive Summary (TL;DR)

Unauthenticated remote attackers can query specific path-resolution APIs in SiYuan to discover the structures, names, and IDs of private, hidden, or password-protected documents when deployed in public publish mode.

SiYuan before v3.7.4 fails to enforce publish-access filters on five filetree path-resolution endpoints, allowing unauthenticated attackers to reconstruct private directory layouts and map document structures.

Vulnerability Overview

SiYuan is a local-first personal knowledge management system developed in Go and TypeScript. It supports a publish mode, allowing users to share specific notebooks and documents with the public or with authenticated readers. To protect sensitive information, users can restrict pages by setting their status to hidden, password-protected, or fully disabled for publication.

The core file-management backend, implemented as a Go service running on the Gin HTTP framework, is responsible for processing document hierarchies and serving filetrees. When publish mode is enabled without password authentication, the application exposes API endpoints intended to assist the frontend in resolving filetree paths. These endpoints resolve internal document identifiers (IDs) into human-readable hierarchical paths and vice versa.

In versions prior to v3.7.4, the application fails to validate whether the requested resources are authorized for the calling context. Because of this omission, any unauthenticated network actor can query these endpoints directly. The lack of authorization checks exposes metadata representing the entire structure of the personal knowledge base, including documents explicitly marked as private.

Root Cause Analysis

The root cause of CVE-2026-72799 lies in a missing authorization check within the handlers defined in kernel/api/filetree.go. When an API request is received, the handler processes the incoming payload and queries the database or memory-mapped index (BlockTree) without verifying the client's current authorization level against the target resource's publication properties. The application assumes that any client allowed to access the basic read-only context is also allowed to resolve paths for all existing IDs.

Specifically, the affected endpoints include /api/filetree/getFullHPathByID, /api/filetree/getHPathByID, /api/filetree/getPathByID, /api/filetree/getIDsByHPath, and /api/filetree/getHPathByPath. These endpoints perform direct lookups in the internal SQLite database or the structured Go models. These lookups are performed without filtering results based on whether the containing notebook or the individual document is flagged as hidden, password-protected, or forbidden from being published.

This behavior allows unauthorized users to perform targeted queries. An attacker with access to a single valid ID or human-readable path can traverse the entire parent and child relationships of that node. Because document IDs are generated using predictable timestamp patterns, attackers can brute-force the ID space or sequentially resolve metadata to extract the exact logical structure of folders and files.

Code-Level Analysis and Patch Verification

To resolve the vulnerability, the developers introduced strict role context and publish-access validation checks inside the kernel/api/filetree.go handler methods. The fix utilizes the model.IsReadOnlyRoleContext(c) helper function to detect whether the current HTTP request originates from an unauthenticated or read-only reader session. If a read-only context is active, the application fetches the active publication configuration using model.GetPublishAccess() and enforces permissions.

// Code snippet showing the added validation in getHPathByID
if model.IsReadOnlyRoleContext(c) {
	publishAccess := model.GetPublishAccess()
	if !model.CheckBlockIdMetadataAccessableByPublishAccess(c, publishAccess, id) {
		ret.Code = -1
		ret.Msg = model.ErrTreeNotFound.Error()
		return
	}
}

The check calls CheckBlockIdMetadataAccessableByPublishAccess, which maps to the underlying database and checks if the path or box ID is marked as disabled or password-protected. If the validation fails, the API responds with a generic error message indicating that the tree or block was not found, preventing metadata leakage.

// The array filter implementation introduced to protect bulk path resolutions
func filterFileTreePathsByPublishMetadataAccess(c *gin.Context, paths []string) (ret []string) {
	if !model.IsReadOnlyRoleContext(c) {
		return paths
	}
	ids := make([]string, 0, len(paths))
	for _, p := range paths {
		ids = append(ids, util.GetTreeID(p))
	}
	blockTrees := treenode.GetBlockTrees(ids)
	publishAccess := model.GetPublishAccess()
	ret = make([]string, 0, len(paths))
	for i, p := range paths {
		if model.CheckBlockTreeMetadataAccessableByPublishAccess(c, publishAccess, blockTrees[ids[i]]) {
			ret = append(ret, p)
		}
	}
	return
}

This filter resolves the IDs from each path, loads the cached BlockTree records, and evaluates access permissions on each item individually. For documents that are password-protected, the verification routine CheckBlockTreeMetadataAccessableByPublishAccess ensures that the client possesses the correct authorization cookie value via CheckPublishAuthCookie before returning the metadata.

Exploitation Methodology

Exploitation of CVE-2026-72799 is straightforward and requires no active user interaction or elevated privileges. An attacker only needs network-level access to the target SiYuan instance when it is configured in publish mode with public access allowed. By sending a crafted HTTP POST request containing a known or predicted document ID, the attacker can verify the existence and retrieve the hierarchical path of the document.

The attack begins with reconnaissance to find exposed SiYuan instances. Once identified, the attacker targets the /api/filetree/getFullHPathByID endpoint with structural or guessable document IDs, which are typically formatted with a prefix based on the creation timestamp. If the server is vulnerable, it responds with the full structural path containing sensitive directory names and private file titles.

To discover all files within a private directory, the attacker can leverage the /api/filetree/getIDsByHPath endpoint. By specifying a known or leaked path prefix, the API returns a complete array of document IDs under that directory. The attacker can then programmatically iterate through these retrieved IDs to reconstruct the entire document hierarchy of the host system.

Security Impact Assessment

The vulnerability carries a CVSS v4.0 base score of 6.9 and a CVSS v3.1 base score of 5.8, reflecting its impact on confidentiality. Although the vulnerability does not allow direct remote code execution or modification of data, the leakage of document metadata represents a significant privacy and security risk. This is particularly critical because personal knowledge bases often contain sensitive personal, corporate, or financial details.

An attacker exploiting this flaw can map the entire logical layout of private notebooks, revealing restricted project directories, client lists, internal system designs, or credential archives. Knowledge of document titles and their paths can also expose security-sensitive terms that are meant to be kept hidden, such as directories labeled with internal server names, proprietary codebases, or key management folders.

Furthermore, this metadata leakage undermines the efficacy of document password protections. While an attacker cannot directly read the raw markdown contents of a password-protected document through these endpoints, learning the precise document titles and directory locations provides valuable targets for secondary attacks. These secondary attacks include credential stuffing or spear-phishing campaigns tailored to the revealed hierarchy.

Remediation and Defense

The most effective remediation is upgrading all SiYuan instances to version v3.7.4 or higher, which properly implements server-side authorization validations on all filetree APIs. If upgrading is not immediately feasible, administrators must implement network-level or application-level mitigations to prevent unauthorized access.

Administrators should configure the application to enable publish authentication by setting Publish.Auth.Enable to true. This action enforces password verification before allowing any access to the endpoints. Additionally, implementing a reverse proxy such as Nginx or Caddy is highly recommended to block external access to the /api/filetree/* endpoints from untrusted networks.

> [!NOTE] > Restricting API access via a reverse proxy may impact some frontend editing and navigation functionalities for legitimate remote users, but it serves as an effective temporary mitigation until the software can be patched.

To detect exploitation attempts, security operations teams should analyze reverse proxy or web server access logs. They should search for sequential POST requests to /api/filetree/getFullHPathByID or similar endpoints originating from unexpected IP addresses, which typically indicate automated mapping and enumeration scripts.

Official Patches

siyuan-noteCode patch addressing unauthorized access to filetree APIs

Fix Analysis (1)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
EPSS Probability
0.24%
Top 85% most exploited

Affected Systems

SiYuan Personal Knowledge Management System

Affected Versions Detail

Product
Affected Versions
Fixed Version
SiYuan
siyuan-note
< v3.7.4v3.7.4
AttributeDetail
CWE IDCWE-862
Attack VectorNetwork
CVSS v4.06.9
EPSS Score0.00237 (Percentile: 14.53%)
ImpactInformation Disclosure / Metadata Leakage
Exploit StatusProof-of-Concept / Patch-based Analysis
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-862
Missing Authorization

The software does not perform an authorization check when an actor attempts to access a resource or perform an action, allowing the actor to view restricted data.

Known Exploits & Detection

GitHub Security AdvisoryDescription of the affected endpoints and vulnerable configurations.

Vulnerability Timeline

Official fix committed to repository
2026-07-24
Security Advisory GHSA-5w7r-f4cg-rqq7 published and CVE-2026-72799 assigned
2026-08-12
VulnCheck publishes vulnerability profile
2026-08-12
National Vulnerability Database processes CVE record
2026-08-26

References & Sources

  • [1]GitHub Security Advisory GHSA-5w7r-f4cg-rqq7
  • [2]Fix Commit 5bae092
  • [3]CVE-2026-72799 on CVE.org

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•7 minutes ago•CVE-2026-63733
4.3

CVE-2026-63733: Incorrect Authorization in SurrealDB Permissions Clause

An incorrect authorization vulnerability (CWE-863) in SurrealDB allows authenticated, low-privileged users to execute unauthorized state-modifying queries. This occurs because the database disabled permissions during evaluation of custom PERMISSIONS WHERE predicates to prevent infinite recursion.

Alon Barad
Alon Barad
0 views•7 min read
•about 2 hours ago•CVE-2026-72798
9.2

CVE-2026-72798: Missing Authorization and Information Disclosure in SiYuan renderAttributeView

Prior to version v3.7.4, the SiYuan personal knowledge management system contained a critical logical authorization vulnerability within its database view rendering component. The flaws allowed unauthenticated remote attackers to bypass publish-access filters on databases, exposing sensitive Relation and Rollup cell contents belonging to private or password-protected repositories.

Amit Schendel
Amit Schendel
2 views•5 min read
•about 3 hours ago•CVE-2026-72797
6.9

CVE-2026-72797: Missing Authorization in SiYuan Notebook Metadata Endpoint

An information disclosure vulnerability exists in SiYuan prior to v3.7.4 due to missing authorization checks on the getEncryptedNotebookStatus API endpoint, allowing unprivileged or anonymous users to enumerate protected notebooks.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 4 hours ago•CVE-2026-72794
8.6

CVE-2026-72794: Cryptographic Key Leakage and Session Forgery in SiYuan

An information disclosure vulnerability in the SiYuan application exposes the global session cookie signing key via the `/api/system/getConf` endpoint. This allows unauthenticated remote attackers or low-privileged users to forge administrative session cookies and gain unauthorized access to the application kernel.

Alon Barad
Alon Barad
5 views•6 min read
•about 5 hours ago•CVE-2026-72795
9.2

CVE-2026-72795: Missing Authorization in SiYuan Block DOM Rendering

CVE-2026-72795 is a critical missing authorization vulnerability (CWE-862) in SiYuan, a self-hosted personal knowledge platform. When configured in publish/read-only mode, the application fails to validate publish-access rules on dynamic child blocks transcluded via SQL queries. This allows anonymous external visitors to access hidden, password-protected, or forbidden note content.

Alon Barad
Alon Barad
3 views•5 min read
•about 6 hours ago•CVE-2026-72793
8.6

CVE-2026-72793: Information Disclosure and Session Forgery in SiYuan Note-Taking Application

A critical information disclosure vulnerability in the SiYuan note-taking application allows remote attackers to retrieve sensitive configurations, including cryptographic session-cookie signing keys and absolute host system directories, leading to administrative session hijacking.

Amit Schendel
Amit Schendel
5 views•6 min read