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

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

Alon Barad
Alon Barad
Software Engineer

Sep 5, 2026·6 min read·5 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can extract the session-signing secret key from the configuration endpoint and forge session cookies to obtain administrative access.

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.

Vulnerability Overview

SiYuan is an open-source personal knowledge management system. In default configurations, it exposes a local API server for managing notebooks, configuration settings, and data synchronization. The core application logic runs on a Go-based kernel, which routes internal and external administrative requests through a set of API endpoints.

The /api/system/getConf endpoint handles requests to retrieve the current application configuration. This endpoint is exposed to the network to allow clients to query user interface, language, and system configuration data. However, the endpoint is only protected by a general authentication check middleware (CheckAuth) which does not validate whether the requesting identity possesses administrative privileges.

Under specific system states, such as when the application operates in publish mode with public access allowed, unauthenticated users can access this endpoint. Furthermore, users with read-only roles (RoleReader) can successfully query the endpoint, exposing internal state variables. The lack of access-control differentiation represents the primary architectural exposure vector.

Root Cause Analysis

The root cause of CVE-2026-72794 lies in the failure to sanitize the AppConf.CookieKey struct field before serializing the configuration object into JSON. When a client queries /api/system/getConf, the handler calls GetMaskedConf() to filter sensitive attributes. The sanitization logic was implemented via a negative control list (blocklist) rather than a strict positive control list (allowlist).

In versions prior to v3.7.4, the sanitization chain included GetMaskedConf, HideConfSecret, and FilterConfByPublishIgnore. While these routines successfully masked high-profile fields like UserData, MCPOAuth, and specific credentials within AI and Repo configurations, they omitted CookieKey. Consequently, the raw bytes or string value of the cookie-signing key remained populated in the internal configuration struct.

When the Go struct is serialized to JSON using the default standard library encoder, the field CookieKey is transformed into cookieKey and transmitted over the network. This design flaw relies on client-side masking to hide details in the browser interface, failing to recognize that raw network payloads remain completely visible to any user or tool intercepting the JSON response.

Code Analysis

To understand the structural flaw, we analyze the path of the configuration model serialization. The application initialization configures cookie session storage using CookieKey as the cryptographic HMAC signing secret. The session store configuration process uses the following sequence to assign the key:

Below is the comparative diff showing the vulnerable logic versus the patched implementation in kernel/model/conf.go. The patch directly intercepts the initialization and sanitization functions to strip CookieKey from the returned structure before serialization:

File: kernel/model/conf.go
@@ -1239,6 +1239,7 @@ func GetMaskedConf() (ret *AppConf, err error) {
 
 	ret.UserData = MaskedUserData
 	ret.MCPOAuth = ""
+	ret.CookieKey = ""
 	if "" != ret.AccessAuthCode {
 		ret.AccessAuthCode = MaskedAccessAuthCode
 	}
@@ -1250,6 +1251,7 @@ func GetMaskedConf() (ret *AppConf, err error) {
 func HideConfSecret(c *AppConf) {
 	c.AI = &conf.AI{}
 	c.MCPOAuth = ""
+	c.CookieKey = ""
 	c.Api = &conf.API{}
 	c.Flashcard = &conf.Flashcard{}
 	c.ServerAddrs = []string{}

The regression testing suite introduced in kernel/model/conf_secret_test.go verifies the state integrity of the patch. The test asserts that calling GetMaskedConf() strips the CookieKey while ensuring the live runtime configuration structure retains the legitimate key for session validation. This ensures that the configuration state is not permanently corrupted in memory while serving API requests.

Exploitation & Proof-of-Concept

An attacker exploits this vulnerability by sending a standard HTTP POST request to the /api/system/getConf endpoint. Because the application processes JSON inputs, the request body needs only to be an empty JSON object {}. The server processes the request, evaluates the authorization context, and returns a JSON payload containing the unmasked cookieKey attribute in plain text.

After extracting the cookieKey, the attacker can forge administrative session cookies. The SiYuan application uses the standard gorilla/securecookie codec via the Gonic session middleware. A forged session cookie requires the attacker to use the leaked HMAC key to sign custom session values. This allows the attacker to craft a cookie named siyuan containing authenticated session indicators.

Once the signed cookie is constructed, the attacker injects the cookie into their browser or HTTP client. When the server receives requests with the forged cookie, the cryptographic signature is validated against the known CookieKey. Because the signature matches, the server accepts the request as authenticated, granting the attacker the privileges associated with the forged identity.

Impact Assessment

The security impact of a leaked cryptographic session key is classified as High. An attacker who can forge sessions bypasses the fundamental authentication controls of the application. If the target instance is deployed with default configurations or lacks an access authentication code (AccessAuthCode), the attacker immediately obtains full administrative access to the notebook server.

A successful administrative compromise allows the attacker to read, modify, or delete all stored markdown notes, database content, and synchronized assets. This completely undermines the confidentiality and integrity of the user's data. Furthermore, depending on the environment, administrative access to the kernel API can lead to remote code execution through the abuse of system execution features or local path write capabilities.

The CVSS v3.1 score is evaluated at 8.6, representing high severity. The attack vector is Network, complexity is Low, and no privileges are required under publish mode configuration. The impact on confidentiality is high, whereas integrity and availability impacts depend on secondary access controls and configuration parameters.

Remediation & Mitigation

The definitive solution to mitigate CVE-2026-72794 is to upgrade the SiYuan application to version 3.7.4 or later. This version implements explicit sanitization of the CookieKey field prior to serialization in the /api/system/getConf endpoint. Upgrading guarantees that unauthenticated queries and read-only users cannot access the cryptographic secret.

Merely updating the application software is insufficient if the key was historically exposed. System administrators must rotate the CookieKey stored within the configuration files (such as conf.json or within environment configurations). Generating a new random cryptographic secret invalidates any previously leaked keys and terminates all active sessions, forcing a secure state reset.

Organizations should also implement perimeter defense strategies. Restricting direct access to administrative ports via firewalls or reverse proxy access control lists limits the exposure of internal APIs. Additionally, ensuring that publish-mode authorization (Publish.Auth.Enable) is configured to require authentication reduces the surface area available to anonymous remote attackers.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.6/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
EPSS Probability
0.25%
Top 84% most exploited

Affected Systems

SiYuan personal knowledge management system

Affected Versions Detail

Product
Affected Versions
Fixed Version
siyuan
siyuan-note
< 3.7.4v3.7.4
AttributeDetail
CWE IDCWE-522
Attack VectorNetwork
CVSS v3.1 Score8.6
EPSS Score0.00249
Exploit StatusPoC available
KEV StatusNot listed

MITRE ATT&CK Mapping

T1552Unsecured Credentials
Credential Access
T1539Steal Web Session Cookie
Credential Access
T1606.001Forge Web Credentials
Credential Access
CWE-522
Insufficiently Protected Credentials

The product transmits or stores sensitive credentials without adequate protection, allowing them to be retrieved by unauthorized actors.

References & Sources

  • [1]GHSA-34fj-mwm6-fjfg: Session Cookie Key Disclosure in SiYuan
  • [2]Fix Commit: Clear CookieKey in GetMaskedConf and HideConfSecret
  • [3]VulnCheck Advisory: SiYuan Session Cookie Key Disclosure

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

•20 minutes ago•CVE-2026-72799
6.9

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

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.

Alon Barad
Alon Barad
0 views•7 min read
•about 1 hour 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
1 views•5 min read
•about 2 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-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 5 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
•about 6 hours ago•CVE-2026-72792
6.9

CVE-2026-72792: Information Disclosure via Tag API Endpoint in SiYuan

SiYuan before version v3.7.4 is affected by an information disclosure vulnerability in the `/api/tag/getTag` endpoint. Under publish mode, this endpoint returns tag labels and occurrence counts from password-protected documents to unauthenticated readers, allowing them to enumerate protected vocabulary and internal metadata without providing the document's publish password.

Amit Schendel
Amit Schendel
4 views•5 min read