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-72796

CVE-2026-72796: Access Control Bypass via Static Routes in SiYuan

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 4, 2026·8 min read·18 visits

Executive Summary (TL;DR)

Inconsistent authorization controls in SiYuan prior to v3.7.4 permitted low-privilege or anonymous readers to bypass REST API security filters and download sensitive templates, snippets, widgets, and ZIP backups by accessing their static routes directly.

A detailed technical breakdown of CVE-2026-72796 (GHSA-fgmr-7w36-9qfq), an access control bypass vulnerability in the SiYuan personal knowledge management system. Prior to version 3.7.4, inconsistent authorization checks between dynamic API endpoints and static file routes allowed authenticated low-privilege readers or anonymous public users to read sensitive files, templates, snippets, and export directories.

Vulnerability Overview

SiYuan is a privacy-first, self-hosted personal knowledge management system that utilizes a local-first architecture while providing web-facing components for remote access and publishing. Prior to version 3.7.4, the application's backend server suffered from an authorization inconsistency in its routing logic. While dynamic REST API endpoints were protected by rigorous, role-based access control filters, static-file route groups bypassed these fine-grained authorization policies.

This flaw is classified under CWE-862 (Missing Authorization). The system exposed several sensitive static asset directories directly via the Gin Web Framework's static routing engine. Because these routes only verified the presence of basic authentication or a reader token, low-privilege readers and anonymous users could access administrative folders. This allowed the unauthorized disclosure of document templates, customized widgets, snippet files, and static export archives.

The attack surface is exposed via the web interface of any network-accessible SiYuan instance. An attacker with a valid low-privilege reader session, or an unauthenticated user if the instance is configured in public-publish mode, can bypass REST-level security restrictions. The impact is limited to confidentiality, enabling unauthorized retrieval of sensitive configuration parameters, custom script payloads, and potentially full database export backups.

The vendor mitigated this vulnerability in version 3.7.4 by implementing a dual-layer defensive control. First, sensitive static endpoints were restricted to verified administrators. Second, a dynamic reference-validation mechanism was introduced to parse Markdown Abstract Syntax Trees (ASTs) and dynamically authorize static assets only if they are actively referenced within a public document.

Root Cause Analysis

The SiYuan backend server uses the Gin Web Framework in Go to handle HTTP routing. The application registers dynamic API endpoints and static file directories within the same server initialization file, located at kernel/server/serve.go. In the vulnerable versions, the routing architecture created two separate paths for accessing workspace data: dynamic REST query endpoints and static file-serving groups.

The primary flaw lies in the inconsistent application of middleware across these routing paths. The REST API endpoints enforced strict, role-based authorization checks, validating that the requesting user possessed the administrator role before serving resources like templates or snippets. Conversely, static file route groups—such as /templates/*, /export/*, /widgets/*, /emojis/*, and /snippets/*—were registered using only the general model.CheckAuth middleware.

The model.CheckAuth middleware is designed to verify that the requesting client possesses a valid session, token, or cookie. However, in anonymous public-sharing or reader mode, this middleware considers low-privilege readers as authorized entities. Because the static route configuration mapped these entire directories to the file system under model.CheckAuth, the application failed to verify if the requesting entity had the specific administrator privileges required to access the underlying directories.

In addition to the missing authorization controls, the registration of these static routes lacked robust path-traversal validation. For example, the handler for /snippets/ utilized naive concatenation with filepath.Join and performed simple substring validation. While the system attempted to prevent directory traversal, it lacked central normalization, creating risk when handling complex URLs or symbolic links within the data directory.

Code Analysis

In versions prior to 3.7.4, the routing configuration in kernel/server/serve.go did not include administrative verification checks for static resource groups. The following code snippet illustrates the insecure configuration where the entire templates and widgets directories were exposed using Gin's standard static router grouping:

// Pre-patch code in kernel/server/serve.go
func serveWidgets(ginServer *gin.Engine) {
    // Insecure: only verifies basic auth, exposing all widgets
    widgets := ginServer.Group("/widgets/", model.CheckAuth)
    widgets.Static("", filepath.Join(util.DataDir, "widgets"))
}
 
func serveTemplates(ginServer *gin.Engine) {
    // Insecure: exposes all user-defined templates without admin verification
    templates := ginServer.Group("/templates/", model.CheckAuth)
    templates.Static("", filepath.Join(util.DataDir, "templates"))
}

The patch in commit 34be6c0bb0739d5b8e99ecc0cbfb474abb16230d introduces strict route separation and implements custom static handlers. In the patched code, access to sensitive templates and exports is strictly bound to administrative accounts, while a reference-checking mechanism secures widgets:

// Patched code in kernel/server/serve.go
func serveTemplates(ginServer *gin.Engine) {
    // Secure: admin-only check is now enforced on templates
    templates := ginServer.Group("/templates/", model.CheckAuth, model.CheckAdminRole)
    registerStaticFileHandlers(templates, filepath.Join(util.DataDir, "templates"), true, nil)
}

The custom handler function registerStaticFileHandlers replaces direct Gin file mapping. It enforces normalization of path requests through cleanStaticRelativePath, which filters out malicious traversal components prior to executing any file system read operation:

func cleanStaticRelativePath(requestPath string) (string, bool) {
    requestPath = strings.TrimPrefix(requestPath, "/")
    relativePath := filepath.Clean(filepath.FromSlash(requestPath))
    // Prevent directory traversal and escape sequences
    if filepath.IsAbs(relativePath) || filepath.VolumeName(relativePath) != "" ||
        relativePath == ".." || strings.HasPrefix(relativePath, ".."+string(os.PathSeparator)) {
        return "", false
    }
    return relativePath, true
}

The implementation of the cleanStaticRelativePath function combined with model.CheckAdminRole effectively remediates both directory traversal risks and the access control bypass on templates. For standard assets like emojis or widgets that must remain readable by guests, the patch implements a dynamic validation filter discussed in the mitigation section.

Exploitation

To exploit this vulnerability, an attacker must first establish a network connection to the target SiYuan web interface. The exploit does not require administrator privileges. Depending on the server configuration, the threat actor needs either a low-privilege reader token (if the server requires basic authentication) or zero authentication (if the instance is running in anonymous public-publish mode).

The attack relies on requesting static paths directly rather than querying the REST API endpoints. An administrator might block a regular reader from retrieving document templates via the standard API interface. However, the attacker bypasses this restriction by making a direct GET request targeting the static directory alias, for instance:

curl -i -H "Authorization: Token <low_privilege_reader_token>" \
     "http://siyuan-target.local:6806/templates/confidential-template.md"

Because the server did not validate whether the requested resource was linked to a public page, an attacker can brute-force common names of templates, custom snippets, and widgets. If an administrator previously exported the workspace database, the resulting file is saved in the static export directory. The attacker can download the export file by predicting or guessing its name, bypassing administrative REST controls:

curl -O "http://siyuan-target.local:6806/export/workspace_backup.zip"

Impact Assessment

The primary consequence of this vulnerability is the unauthorized disclosure of sensitive data. Because templates, export directories, and snippets can contain proprietary system configurations, API keys, or private notes, exposing these directories results in a serious breach of confidentiality. An attacker cannot use this vulnerability to write or modify server files, preserving the integrity of the data store.

In the context of CVSS v3.1, this vulnerability achieves a base score of 5.8 (Medium), with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N. The scope parameter is marked as Changed (S:C) because the path-based authorization bypass permits transition from the restricted application-level sandbox directly to raw filesystem asset directories.

Currently, this vulnerability has an EPSS score of 0.00257 (0.26%), indicating a low overall probability of exploitation in wild campaigns within a 30-day window. It is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, nor is it associated with known active ransomware frameworks. However, the ease of replication using single-line HTTP requests highlights the risk to self-hosted instances exposed directly to the public internet.

Remediation and Mitigation

The definitive remediation for CVE-2026-72796 is upgrading the SiYuan application to version 3.7.4 or later. In version 3.7.4, the developers refactored the routing subsystem to require model.CheckAdminRole on all sensitive directories including /templates/ and /export/. For containerized deployments, administrators should update their Docker configurations to fetch the latest official image tag.

For static directories that must remain accessible to public readers (such as /widgets/ and /emojis/), the vendor implemented a dynamic reference-validation mechanism. This engine parses the Markdown Abstract Syntax Tree (AST) of all published documents using the Lute engine. It extracts active widget and emoji references, dynamically adding them to a whitelist cache. When a reader requests a static widget, the server checks if that widget is in the whitelist, returning 403 Forbidden if it is not actively referenced.

If upgrading immediately is not feasible, administrators must reduce the exposed attack surface through configuration hardening. First, disable public publish mode and restrict the instance behind an authentication proxy or a private network segment. Second, manually inspect and clean the temp/export directory located in the application's workspace path to ensure no historical exports or sensitive zip archives remain readable on disk.

Technical Appendix

CVSS Score
5.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Affected Systems

SiYuan Personal Knowledge Management System
AttributeDetail
CWE IDCWE-862
Attack VectorNetwork
CVSS Score5.8 (Medium)
EPSS Score0.00257 (17.14th percentile)
ImpactConfidentiality
Exploit StatusProof-of-Concept
KEV StatusNot Listed
CWE-862
Missing Authorization

Vulnerability Timeline

Official patch committed to repository
2026-07-25
GitHub Security Advisory GHSA-fgmr-7w36-9qfq published
2026-08-12
CVE-2026-72796 assigned and published
2026-08-12

References & Sources

  • [1]GitHub Security Advisory GHSA-fgmr-7w36-9qfq
  • [2]SiYuan Fix Commit 34be6c0

More Reports

•20 minutes ago•CVE-2026-120792
7.3

CVE-2026-120792: Local Information Disclosure via Temporary File Logging in Microsoft .NET Aspire CLI

CVE-2026-120792 is a high-severity local information disclosure vulnerability in the Microsoft .NET Aspire CLI (Aspire.Cli) affecting versions 13.5.4 prior to 13.6.5. The flaw stems from the insertion of sensitive information into a shared temporary log file (CWE-532) combined with insecure temporary file creation (CWE-377) within the DeprecatedMcpCommandScanner component. During agent configuration scanning, the CLI unconditionally appends internal workspace paths and the first 200 characters of Model Context Protocol (MCP) agent configuration files to a statically named file in the system temporary directory. On multi-user systems, unprivileged local users can read this file to harvest API keys, authentication tokens, and internal service endpoints.

Alon Barad
Alon Barad
0 views•9 min read
•about 1 hour ago•CVE-2026-114159
8.8

CVE-2026-114159: Heap-Based Buffer Overflow in Microsoft Visual Studio and .NET Native Symbol Reader

CVE-2026-114159 is a heap-based buffer overflow vulnerability (CWE-122) in Microsoft.DiaSymReader.Native affecting Microsoft Visual Studio and the .NET Runtime on Windows. An integer truncation error during the parsing of oversized document names in Portable PDB symbol files causes an undersized heap allocation, leading to an out-of-bounds memory write and remote code execution.

Alon Barad
Alon Barad
4 views•10 min read
•about 2 hours ago•CVE-2026-114158
8.8

CVE-2026-114158: Heap-Based Buffer Overflow in Microsoft.DiaSymReader.Native Portable PDB Parser

CVE-2026-114158 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported servicing branches of Microsoft .NET (.NET 8.0, 9.0, 10.0, and 11.0) on Windows. The flaw resides in the native symbol reader library, Microsoft.DiaSymReader.Native, and is triggered when parsing Portable Program Database (PDB) metadata containing malformed EmbeddedSource custom debug information records. By supplying a parent Record Identifier (RID) of zero or an out-of-bounds value, an attacker causes an integer underflow during 1-based to 0-based index conversion, leading to a heap-based buffer overflow and arbitrary code execution within the context of the host developer tool or runtime.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•CVE-2026-114151
8.8

CVE-2026-114151: Remote Code Execution via Stack-Based Buffer Overflow in Microsoft Visual Studio and .NET Symbol Reader

CVE-2026-114151 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the Microsoft .NET runtime on Windows. The flaw resides in the native Debug Information Access (DIA) symbol reader component, Microsoft.DiaSymReader.Native. When parsing Program Database (.pdb) files, the component fails to validate the length of serialized numeric records (specifically LF_DECIMAL structures) before unpacking them into a fixed-size stack buffer. An attacker who convinces a user or automated diagnostic process to load a crafted .pdb file can trigger a stack-based buffer overflow, resulting in arbitrary code execution within the context of the host process.

Alon Barad
Alon Barad
3 views•9 min read
•about 4 hours ago•GHSA-6856-87HX-P5X7
7.5

CVE-2026-105544: Local Elevation of Privilege in .NET Test Platform CLI

CVE-2026-105544 is a high-severity local elevation of privilege vulnerability in Microsoft .NET and Microsoft.TestPlatform.CLI. Improper access control on local inter-process communication mechanisms and execution brokers allows an authorized local attacker to cross security boundaries and execute arbitrary code in the context of a higher-privileged user running a test execution cycle.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 6 hours ago•CVE-2026-114152
8.8

CVE-2026-114152: Stack-Based Buffer Overflow and Untrusted Pointer Dereference in Microsoft DiaSymReader.Native

CVE-2026-114152 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple servicing branches of the Microsoft .NET runtime (.NET 8.0, 9.0, 10.0, and 11.0) on Windows platforms. The vulnerability exists within the native symbol reader library, Microsoft.DiaSymReader.Native, specifically inside the DiaObjectFile::ApplyFixup method during the processing of Common Object File Format (COFF) relocation records. By supplying a malformed object file or Program Database (PDB) symbol file containing out-of-bounds relocation offsets or invalid symbol table indices, an unauthenticated attacker can trigger an untrusted pointer dereference (CWE-822) and a stack-based buffer overflow (CWE-121). Successful exploitation occurs when a victim opens, compiles, or debugs a malicious project or symbol artifact, leading to arbitrary code execution within the security context of the active developer environment or build process.

Amit Schendel
Amit Schendel
5 views•11 min read