Oct 1, 2026·6 min read·19 visits
Unauthenticated API requests to `/api/block/getRefIDs` bypass password checks, leaking relationship hierarchies in SiYuan.
An authorization bypass and information disclosure vulnerability in the SiYuan personal knowledge management system before version 3.7.4 allows unauthenticated attackers to query block relationship metadata from password-protected documents.
SiYuan is a local-first personal knowledge management platform designed to orchestrate complex personal databases, document hierarchies, and relational links between data blocks. To facilitate cooperation and knowledge dissemination, the platform incorporates a publish mode that allows self-hosters to share selected notebooks with unauthenticated users, or protect them with granular access levels.
The attack surface of this architecture relies on how the application handles reference queries on shared content. The /api/block/getRefIDs endpoint resolves the bidirectional references between blocks in published notebooks, allowing unauthenticated readers to traverse link networks smoothly.
However, a critical authorization bypass exists because the endpoint fails to properly validate access permissions for password-protected documents. While structural filters successfully screen out documents residing in hidden or completely forbidden notebooks, the application lets unauthenticated users retrieve reference mappings from password-protected documents without entering the associated password.
The vulnerability stems from an inconsistency in how authentication checks are integrated across different layers of the Go-based application kernel. Within kernel/api/router.go, the route for /api/block/getRefIDs is configured to map to the getRefIDs handler. While this route is wrapped with the standard model.CheckAuth middleware, this configuration is insufficient during public publish mode where read-only access is permitted for unauthenticated external clients.
Inside the handler located in kernel/api/block.go, the application retrieves block reference definitions and attempts to sanitize them based on the active user's permissions. The processing logic forwards the query down to FilterRefDefsByPublishIgnore in kernel/model/publish_access.go, which ultimately invokes FilterBlockTreesByPublishIgnore to evaluate permission states.
The structural defect is situated in this validation step. The function relies on CheckPathAccessableByPublishIgnore to filter block trees, but this utility only checks coarse-grained notebook visibility structures (i.e., whether the notebook is configured as hidden or disabled). Because CheckPathAccessableByPublishIgnore has no access to the routing context (*gin.Context), it cannot check the PublishAuthCookie or verify whether the unauthenticated visitor has entered the password required by the document's authorization rules.
Analyzing the vulnerable code path exposes the missing validation layer in the filtering function. The vulnerable implementation in kernel/model/publish_access.go iterates over block trees and directly passes the paths to the structural checker, completely ignoring session or cookie states:
// Vulnerable logic lacking context and password verification
func FilterBlockTreesByPublishIgnore(bts map[string]*treenode.BlockTree, publishIgnore []string) map[string]*treenode.BlockTree {
ret := make(map[string]*treenode.BlockTree)
for id, bt := range bts {
if CheckPathAccessableByPublishIgnore(bt.BoxID, bt.Path, publishIgnore) {
ret[id] = bt
}
}
return ret
}To understand the flaw's severity, compare this logic with the standard secure path check defined in checkBlockTreeAccessableByPublishAccess. The secure function processes the *gin.Context object, extracts the notebook password state, and verifies whether the current client holds a valid PublishAuthCookie matching that password:
func checkBlockTreeAccessableByPublishAccess(c *gin.Context, publishAccess PublishAccess, bt *treenode.BlockTree) bool {
if bt == nil || IsEncryptedBoxDeniedByPublishAccess(bt.BoxID) {
return false
}
publishIgnore := filterDisablePublishAccess(publishAccess)
passwordID, password := GetPathPasswordByPublishAccess(bt.BoxID, bt.Path, publishAccess)
return CheckPathAccessableByPublishIgnore(bt.BoxID, bt.Path, publishIgnore) &&
(password == "" || CheckPublishAuthCookie(c, passwordID, password))
}Because the vulnerable logic failed to incorporate the *gin.Context and the associated authentication cookie validations, the application allowed unauthenticated users to completely bypass the password protection layer on any notebook, leaking structural relational data.
Exploitation of CVE-2026-73606 does not require high user privileges or complicated exploitation chains. An attacker first locates a target SiYuan instance exposed to the network with publish mode enabled and password-protected notebooks configured. The attacker then constructs a direct POST request targeting the vulnerable /api/block/getRefIDs endpoint.
By querying specific block identifiers, the attacker bypasses the password requirement. The endpoint processes the request and responds with a JSON array mapping reference structures. The disclosure is restricted to block-to-block mapping metadata, specifically structured as RefDefs configurations, returning the referencing block identifiers (RefID and DefIDs).
Although this vulnerability does not leak raw markdown body text, obtaining these unique block identifiers exposes the system's structural layout. An attacker can leverage this relational map to perform targeted discovery attacks, infer the existence of sensitive documents, or use the leaked IDs as inputs to exploit other endpoints.
The primary impact of this flaw is unauthorized information disclosure and metadata mapping. While traditional vulnerabilities might focus on remote code execution, leaking relationship structures in an integrated database environment violates the core design principles of a personal knowledge base, where document relationships often contain sensitive conceptual associations.
From a technical perspective, the CVSS score is established at 6.9 under CVSS v4.0. The attack complexity is low, privileges are not required, and no user interaction is required to trigger the leak. However, because the confidentiality impact is restricted to structural metadata rather than the raw body text of the document, the confidentiality vector is categorized as low.
Nevertheless, in large-scale deployments or corporate deployments utilizing publish mode, the leakage of document structures compromises confidentiality controls. Attackers can map out database connections, track organizational changes, or use the retrieved block mappings to plan more sophisticated targeted attacks against the hosting environment.
The recommended resolution is to upgrade all SiYuan installations to version 3.7.4 or later immediately. The vendor addressed the issue by integrating context awareness into the filtering architecture, ensuring that low-level validation libraries receive the active *gin.Context and execute password validation routines correctly.
If upgrading immediately is not an option, administrators can apply immediate mitigation strategies to minimize exposure. The most effective workaround is to disable anonymous publish mode or deactivate publishing altogether. Alternatively, configure network-level defenses such as firewalls, web application firewalls (WAFs), or reverse proxies to block all unauthenticated traffic targeting /api/ endpoints.
Administrators should also establish detection mechanisms in their logging infrastructure. Look for repetitive unauthenticated requests targeting /api/block/getRefIDs or investigate patterns of unauthenticated clients scanning multiple block IDs in succession, which is a key indicator of database relationship mapping attempts.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
SiYuan siyuan-note | < 3.7.4 | 3.7.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-639 |
| Attack Vector | Network (AV:N) |
| CVSS v4.0 Score | 6.9 (Medium) |
| EPSS Score | 0.00325 (Percentile: 23.20%) |
| Exploit Status | None (No public exploit) |
| CISA KEV Status | Not Listed |
| Affected Component | kernel/api/block.go (/api/block/getRefIDs) |
The application fails to check authorization when a user requests a resource using a key controlled by the user, leading to unauthorized access to metadata or relationship indicators.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.
A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.