CVE-2026-72793: SiYuan Non-administrator Responses From /api/system/getConf Omit Vulnerability

HIGH
Advisory Identifier: GHSA-h4v5-crx2-3cv4
CVSS 8.6
CWE-522
Published
Advisory Summary

CVE-2026-72793 is a HIGH (CVSS 8.6) non-administrator responses from /api/system/getconf omit vulnerability (CWE-522: Insufficiently Protected Credentials) affecting SiYuan libraries in the Go ecosystem. The issue involves non-administrator responses from /api/system/getconf omit three secrets that the configuration-export path explicitly strips, disclosing the session-cookie signing key and the os username to anonymous readers. Remediation is available by upgrading affected packages to version 0.0.0-20260725132049-2d8b98395a91.

CVE-2026-72793 at a Glance

CVE Identifier CVE-2026-72793
GHSA Identifier GHSA-h4v5-crx2-3cv4
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product SiYuan
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-72793

To remediate this vulnerability, upgrade all affected SiYuan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/siyuan-note/siyuan/kernel fixed: 0.0.0-20260725132049-2d8b98395a91
Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260725132049-2d8b98395a91
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-72793, inspect your project dependencies for SiYuan:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

Analyze the terminal output to locate any version of SiYuan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260725132049-2d8b98395a91), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In SiYuan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**CVE:** This vulnerability corresponds to [CVE-2026-72793](https://nvd.nist.gov/vuln/detail/CVE-2026-72793). ### Summary `/api/system/getConf` is registered with `CheckAuth` only and is reachable by the publish `RoleReader` token, and anonymously when `Publish.Auth.Enable` is `false`. Its non-administrator masking chain is a blocklist that enumerates fields individually. Three fields that the configuration-export endpoint in the same file deliberately clears are absent from that blocklist and are returned to readers: | Field | JSON | What it is | Cleared by `exportConf` at | |---|---|---|---| | `Conf.CookieKey` | `cookieKey` | The session-cookie signing key | `kernel/api/system.go:360` | | `Conf.Export.PandocBin` | `export.pandocBin` | Absolute path embedding the OS username | `kernel/api/system.go:338` | | `Conf.NotebookCrypto` | `notebookCrypto` | Encrypted-notebook key material | `kernel/api/system.go:360` | The project has already classified all three as values that must not leave the server. The reader-facing path returns them. ### Details **Route.** `kernel/api/router.go:70` : `POST /api/system/getConf` → `model.CheckAuth` → `getConf`. No `CheckReadonly`, no `CheckAdminRole`. **The masking chain, and what each stage covers.** `getConf` masks through `GetMaskedConf()` → `HideConfSecret()` (non-administrators) → `FilterConfByPublishIgnore()` (readers) → a browser-request path strip. - `GetMaskedConf`: `UserData`, `MCPOAuth`, `AccessAuthCode`. - `HideConfSecret`: `AI`, `Api`, `Flashcard`, `ServerAddrs`, `Publish`, `Repo`, `Sync`, `Secrets`, `Variables`, and the System paths. No reference to `CookieKey` or `Export.PandocBin`. - `FilterConfByPublishIgnore`: `UILayout` only. - Browser strip (`kernel/api/system.go:630-631`): System paths only. Each stage names fields explicitly, so any field nobody thought to add is returned by default. --- **1. `CookieKey`: the live session-signing key.** The value is passed straight into the session store at startup: ``` cli/cmd/serve.go:67 go server.Serve(false, model.Conf.CookieKey) kernel/server/serve.go:152 sessionStore = cookie.NewStore([]byte(cookieKey)) kernel/server/serve.go:159 ginServer.Use(sessions.Sessions("siyuan", sessionStore)) ``` `gin-contrib/sessions/cookie.NewStore` constructed with a single key uses that key as the `gorilla/securecookie` HMAC key. The `siyuan` session cookie is signed with the value this endpoint hands out, so an attacker holding it can mint and modify session cookies the server accepts as authentic. Escalating a forged session to administrator additionally requires the forged `SessionData` to carry the matching `AccessAuthCode` which *is* masked or the instance to have no access-auth code configured, which is a common deployment. The unconditional impact, present on every instance, is disclosure of a persistent cryptographic secret to an unauthenticated party. Rotating it invalidates every active session, so it cannot be quietly refreshed. --- **2. `Export.PandocBin`: bypasses a shipped privacy control.** The field is an absolute path that embeds the OS username by construction: ``` conf/export.go:35 PandocBin string `json:"pandocBin"` model/conf.go:430-431 if "" == Conf.Export.PandocBin { Conf.Export.PandocBin = util.PandocBinPath } util/pandoc.go:154 PandocBinPath = filepath.Join(tempPandocDir, "bin", "pandoc.exe") util/pandoc.go:134 tempPandocDir = filepath.Join(TempDir, "pandoc") util/working.go:359 TempDir = filepath.Join(WorkspaceDir, "temp") util/working.go:312 defaultWorkspaceDir = filepath.Join(userProfile, "SiYuan") ``` → `C:\Users\<username>\SiYuan\temp\pandoc\bin\pandoc.exe` This one is notable beyond the disclosure itself, because a control was shipped specifically to prevent it. `kernel/api/system.go:630` adds, for browser requests: ```go if util.IsBrowserRequest(c) { maskedConf.System.WorkspaceDir = "" maskedConf.System.AppDir = "" maskedConf.System.ConfDir = "" maskedConf.System.DataDir = "" maskedConf.System.HomeDir = "" } // 避免泄露用户名等敏感信息 ``` The comment states the goal plainly: avoid leaking the username and other sensitive information. The block enumerates only `System.*` and misses `Export.PandocBin`, which carries the same username through the same response. A publish reader is a browser request, so the System paths are blanked while `export.pandocBin` passes through intact. Where an administrator has configured a custom pandoc location, that path is disclosed instead still a filesystem-layout disclosure. --- **3. `NotebookCrypto`.** Encrypted-notebook key material is likewise absent from `HideConfSecret` while `exportConf` sets it to `nil`. Reported previously and included here only because it is the third instance of the same root cause; the fix below closes all three together. --- **The root cause is the blocklist itself.** `exportConf` (`kernel/api/system.go:299`) clones the configuration and clears each secret before returning it `CookieKey`, `NotebookCrypto`, `Export.PandocBin`, `Account`, `Stat`, `System.ID`, the AI keys. That cloner is the project's own working inventory of what must not leave the server. `getConf`'s non-administrator path maintains a separate, shorter list that has now diverged from it in three places. Any future secret added to the config will default to exposed on the reader path unless someone remembers to extend the blocklist. ### Proof of Concept Precondition: publish mode enabled (default port 6808); anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account. ``` POST http://127.0.0.1:6808/api/system/getConf {} → 200. The conf object contains: cookieKey — the session-signing key, cleartext export.pandocBin — absolute path containing the OS username notebookCrypto — encrypted-notebook key material ``` Differential check against the endpoint that strips them, same instance: ``` POST http://127.0.0.1:6808/api/system/exportConf → cookieKey is empty, export.pandocBin is empty, notebookCrypto is null ``` The same three values are withheld by one endpoint and returned by the other. ### Impact An anonymous reader in publish mode or any publish `RoleReader` obtains the server's session-cookie signing key, permitting forgery and tampering of session cookies the server validates as authentic, with administrator authentication reachable on instances that have no access-auth code configured. The same response discloses the operating-system username and workspace layout, defeating a control added specifically to prevent that disclosure, and encrypted-notebook key material. ### Suggested fix Route non-administrator `getConf` responses through the `exportConf` cloner rather than extending `HideConfSecret` field by field. The cloner already handles every field named here and is the list the project actually maintains; keeping two divergent inventories of the same secrets is what produced all three gaps. If a targeted patch is preferred in the interim, clear `CookieKey` and `NotebookCrypto` in `HideConfSecret` and add `Export.PandocBin` to the `IsBrowserRequest` block, then audit the config struct for any remaining absolute-path or secret-bearing field.

CVE-2026-72793 Affected SiYuan Versions

1 component(s)
Fixed Versions:
0.0.0-20260725132049-2d8b98395a91
Product / Package Ecosystem Affected Versions Fixed Version
github.com/siyuan-note/siyuan/kernel
Go
< 0.0.0-20260725132049-2d8b98395a91
0.0.0-20260725132049-2d8b98395a91

References

Frequently Asked Questions

What is CVE-2026-72793?
CVE-2026-72793 is a security vulnerability in SiYuan involving Non-administrator responses from /api/system/getConf omit three secrets that the configuration-export path explicitly strips, disclosing the session-cookie signing key and the OS username to anonymous readers under CWE-522: Insufficiently Protected Credentials.
Which SiYuan versions are affected?
Affected versions include releases prior to 0.0.0-20260725132049-2d8b98395a91 across affected packages: github.com/siyuan-note/siyuan/kernel.
What version fixes CVE-2026-72793?
Upgrading to 0.0.0-20260725132049-2d8b98395a91 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/siyuan-note/siyuan/kernel affected?
Yes, github.com/siyuan-note/siyuan/kernel is affected in releases prior to 0.0.0-20260725132049-2d8b98395a91. Upgrade your dependency to 0.0.0-20260725132049-2d8b98395a91 or later.
What is the CVSS score of CVE-2026-72793?
CVE-2026-72793 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-72793?
CVE-2026-72793 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Go dependencies for CVE-2026-72793?
Run the dependency tree command: 'inspect dependencies for github.com/siyuan-note/siyuan/kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h4v5-crx2-3cv4",
  "modified" : "2026-09-04T21:16:48Z",
  "published" : "2026-09-04T21:16:48Z",
  "aliases" : [ "CVE-2026-72793" ],
  "summary" : "SiYuan: Non-administrator responses from /api/system/getConf omit three secrets that the configuration-export path explicitly strips, disclosing the session-cookie signing key and the OS username to anonymous readers",
  "details" : "**CVE:** This vulnerability corresponds to [CVE-2026-72793](https://nvd.nist.gov/vuln/detail/CVE-2026-72793).\n\n### Summary\n\n`/api/system/getConf` is registered with `CheckAuth` only and is reachable by the publish `RoleReader` token, and anonymously when `Publish.Auth.Enable` is `false`. Its non-administrator masking chain is a blocklist that enumerates fields individually. Three fields that the configuration-export endpoint in the same file deliberately clears are absent from that blocklist and are returned to readers:\n\n| Field | JSON | What it is | Cleared by `exportConf` at |\n|---|---|---|---|\n| `Conf.CookieKey` | `cookieKey` | The session-cookie signing key | `kernel/api/system.go:360` |\n| `Conf.Export.PandocBin` | `export.pandocBin` | Absolute path embedding the OS username | `kernel/api/system.go:338` |\n| `Conf.NotebookCrypto` | `notebookCrypto` | Encrypted-notebook key material | `kernel/api/system.go:360` |\n\nThe project has already classified all three as values that must not leave the server. The reader-facing path returns them.\n\n### Details\n\n**Route.** `kernel/api/router.go:70` : `POST /api/system/getConf` → `model.CheckAuth` → `getConf`. No `CheckReadonly`, no `CheckAdminRole`.\n\n**The masking chain, and what each stage covers.** `getConf` masks through `GetMaskedConf()` → `HideConfSecret()` (non-administrators) → `FilterConfByPublishIgnore()` (readers) → a browser-request path strip.\n\n- `GetMaskedConf`: `UserData`, `MCPOAuth`, `AccessAuthCode`.\n- `HideConfSecret`: `AI`, `Api`, `Flashcard`, `ServerAddrs`, `Publish`, `Repo`, `Sync`, `Secrets`, `Variables`, and the System paths. No reference to `CookieKey` or `Export.PandocBin`.\n- `FilterConfByPublishIgnore`: `UILayout` only.\n- Browser strip (`kernel/api/system.go:630-631`): System paths only.\n\nEach stage names fields explicitly, so any field nobody thought to add is returned by default.\n\n---\n\n**1. `CookieKey`: the live session-signing key.**\n\nThe value is passed straight into the session store at startup:\n\n```\ncli/cmd/serve.go:67          go server.Serve(false, model.Conf.CookieKey)\nkernel/server/serve.go:152   sessionStore = cookie.NewStore([]byte(cookieKey))\nkernel/server/serve.go:159   ginServer.Use(sessions.Sessions(\"siyuan\", sessionStore))\n```\n\n`gin-contrib/sessions/cookie.NewStore` constructed with a single key uses that key as the `gorilla/securecookie` HMAC key. The `siyuan` session cookie is signed with the value this endpoint hands out, so an attacker holding it can mint and modify session cookies the server accepts as authentic.\n\nEscalating a forged session to administrator additionally requires the forged `SessionData` to carry the matching `AccessAuthCode` which *is* masked or the instance to have no access-auth code configured, which is a common deployment. The unconditional impact, present on every instance, is disclosure of a persistent cryptographic secret to an unauthenticated party. Rotating it invalidates every active session, so it cannot be quietly refreshed.\n\n---\n\n**2. `Export.PandocBin`: bypasses a shipped privacy control.**\n\nThe field is an absolute path that embeds the OS username by construction:\n\n```\nconf/export.go:35        PandocBin string `json:\"pandocBin\"`\nmodel/conf.go:430-431    if \"\" == Conf.Export.PandocBin { Conf.Export.PandocBin = util.PandocBinPath }\nutil/pandoc.go:154       PandocBinPath = filepath.Join(tempPandocDir, \"bin\", \"pandoc.exe\")\nutil/pandoc.go:134       tempPandocDir = filepath.Join(TempDir, \"pandoc\")\nutil/working.go:359      TempDir = filepath.Join(WorkspaceDir, \"temp\")\nutil/working.go:312      defaultWorkspaceDir = filepath.Join(userProfile, \"SiYuan\")\n```\n\n→ `C:\\Users\\<username>\\SiYuan\\temp\\pandoc\\bin\\pandoc.exe`\n\nThis one is notable beyond the disclosure itself, because a control was shipped specifically to prevent it. `kernel/api/system.go:630` adds, for browser requests:\n\n```go\nif util.IsBrowserRequest(c) {\n    maskedConf.System.WorkspaceDir = \"\"\n    maskedConf.System.AppDir = \"\"\n    maskedConf.System.ConfDir = \"\"\n    maskedConf.System.DataDir = \"\"\n    maskedConf.System.HomeDir = \"\"\n}   // 避免泄露用户名等敏感信息\n```\n\nThe comment states the goal plainly: avoid leaking the username and other sensitive information. The block enumerates only `System.*` and misses `Export.PandocBin`, which carries the same username through the same response. A publish reader is a browser request, so the System paths are blanked while `export.pandocBin` passes through intact. Where an administrator has configured a custom pandoc location, that path is disclosed instead still a filesystem-layout disclosure.\n\n---\n\n**3. `NotebookCrypto`.** Encrypted-notebook key material is likewise absent from `HideConfSecret` while `exportConf` sets it to `nil`. Reported previously and included here only because it is the third instance of the same root cause; the fix below closes all three together.\n\n---\n\n**The root cause is the blocklist itself.** `exportConf` (`kernel/api/system.go:299`) clones the configuration and clears each secret before returning it `CookieKey`, `NotebookCrypto`, `Export.PandocBin`, `Account`, `Stat`, `System.ID`, the AI keys. That cloner is the project's own working inventory of what must not leave the server. `getConf`'s non-administrator path maintains a separate, shorter list that has now diverged from it in three places. Any future secret added to the config will default to exposed on the reader path unless someone remembers to extend the blocklist.\n\n### Proof of Concept\n\nPrecondition: publish mode enabled (default port 6808); anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account.\n\n```\nPOST http://127.0.0.1:6808/api/system/getConf\n{}\n\n→ 200. The conf object contains:\n     cookieKey          — the session-signing key, cleartext\n     export.pandocBin   — absolute path containing the OS username\n     notebookCrypto     — encrypted-notebook key material\n```\n\nDifferential check against the endpoint that strips them, same instance:\n\n```\nPOST http://127.0.0.1:6808/api/system/exportConf\n\n→ cookieKey is empty, export.pandocBin is empty, notebookCrypto is null\n```\n\nThe same three values are withheld by one endpoint and returned by the other.\n\n### Impact\n\nAn anonymous reader in publish mode or any publish `RoleReader` obtains the server's session-cookie signing key, permitting forgery and tampering of session cookies the server validates as authentic, with administrator authentication reachable on instances that have no access-auth code configured. The same response discloses the operating-system username and workspace layout, defeating a control added specifically to prevent that disclosure, and encrypted-notebook key material.\n\n### Suggested fix\n\nRoute non-administrator `getConf` responses through the `exportConf` cloner rather than extending `HideConfSecret` field by field. The cloner already handles every field named here and is the list the project actually maintains; keeping two divergent inventories of the same secrets is what produced all three gaps. If a targeted patch is preferred in the interim, clear `CookieKey` and `NotebookCrypto` in `HideConfSecret` and add `Export.PandocBin` to the `IsBrowserRequest` block, then audit the config struct for any remaining absolute-path or secret-bearing field.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260725132049-2d8b98395a91"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-h4v5-crx2-3cv4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-72793"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/commit/2d8b98395a910251aea87e90a4fad9c7f954befe"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/siyuan-note/siyuan"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-api-system-getconf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-04T21:16:48Z",
    "nvd_published_at" : null
  }
}