CVE-2026-72794

CVE-2026-72794 is a high-severity security vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions < 0.0.0-20260725123945-77421530be4a. It is fixed in 0.0.0-20260725123945-77421530be4a.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

SiYuan: The session-cookie signing key (Conf.CookieKey) is returned to anonymous readers by /api/system/getConf

CVE: This vulnerability corresponds to CVE-2026-72794.

/api/system/getConf returns Conf.CookieKey, the key used to sign the server's session cookies in its response body. The endpoint is registered with CheckAuth only, so the field reaches the publish RoleReader token and the anonymous account when Publish.Auth.Enable is false.

The configuration-export endpoint in the same file strips this exact field before returning config, so the project already treats it as secret. The reader-facing masking path does not.

Details

Item Detail
Route kernel/api/router.go:70 POST /api/system/getConfmodel.CheckAuthgetConf
Middleware CheckAuth only, no CheckReadonly, no CheckAdminRole
Leaked field AppConf.CookieKey, serialized as cookieKey
Purpose of the field Signing key for the siyuan session cookie

The field survives every stage of the masking chain. getConf masks through GetMaskedConf()HideConfSecret() (non-administrators) → FilterConfByPublishIgnore() (readers) → the browser-side System-path strip. CookieKey is removed by none of them:

  • GetMaskedConf masks UserData, MCPOAuth and AccessAuthCode only.
  • HideConfSecret nulls AI, Api, Flashcard, ServerAddrs, Publish, Repo, Sync, Secrets, Variables and the System paths. It contains no reference to CookieKey.
  • FilterConfByPublishIgnore touches UILayout only.
  • The browser-side strip removes System paths only.

The key is live, not vestigial. It 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 therefore signed with the value the endpoint hands out. An attacker holding it can mint and modify session cookies that the server accepts as authentic.

Guarded sibling, in the same file. exportConf (kernel/api/system.go:299) clones the configuration before returning it and explicitly clears both secrets:

kernel/api/system.go:360   clonedConf.CookieKey = ""
                           clonedConf.NotebookCrypto = nil

The project has already classified CookieKey as a value that must not leave the server. The getConf masking path omits the same field.

Ceiling is environment-dependent, floor is not. Escalating a forged session to administrator additionally requires the forged SessionData to carry the matching AccessAuthCode, which GetMaskedConf does mask or the instance to have no access-auth code configured, which is a common deployment. The unconditional impact, present on every instance, is the disclosure of a persistent cryptographic secret to an unauthenticated party together with the cookie-forgery capability that follows from it. Rotating the key invalidates all existing sessions, so this is not a secret that can be quietly refreshed.

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 response body's conf object contains a cookieKey field holding the
   server's session-signing key in cleartext.

Differential check against the endpoint that does strip it:

POST http://127.0.0.1:6808/api/system/exportConf
→ cookieKey is empty, notebookCrypto is null

The same value is 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. This is a persistent cryptographic secret whose disclosure cannot be remediated without invalidating every active session. Possession of the key permits forging and tampering with siyuan session cookies that the server will validate as authentic. On instances with no access-auth code configured, or where a forged session's contents otherwise satisfy the server's checks, this extends to authenticating as a privileged user.

CVE-2026-72794 has a CVSS score of 8.6 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260725123945-77421530be4a); upgrading removes the vulnerable code path.

Affected versions

github.com/siyuan-note/siyuan/kernel (< 0.0.0-20260725123945-77421530be4a)

Security releases

github.com/siyuan-note/siyuan/kernel → 0.0.0-20260725123945-77421530be4a (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Clear CookieKey in HideConfSecret for all non-administrator responses. The more durable fix is to route non-administrator getConf through the exportConf cloner, which already handles CookieKey, NotebookCrypto, Account, Stat, System.ID, Export.PandocBin and the AI keys replacing the current blocklist, which fails open on every field nobody thought to add, with the allowlist-style cloner the project already maintains.

Frequently Asked Questions

  1. What is CVE-2026-72794? CVE-2026-72794 is a high-severity security vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions < 0.0.0-20260725123945-77421530be4a. It is fixed in 0.0.0-20260725123945-77421530be4a.
  2. How severe is CVE-2026-72794? CVE-2026-72794 has a CVSS score of 8.6 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/siyuan-note/siyuan/kernel are affected by CVE-2026-72794? github.com/siyuan-note/siyuan/kernel (go) versions < 0.0.0-20260725123945-77421530be4a is affected.
  4. Is there a fix for CVE-2026-72794? Yes. CVE-2026-72794 is fixed in 0.0.0-20260725123945-77421530be4a. Upgrade to this version or later.
  5. Is CVE-2026-72794 exploitable, and should I be worried? Whether CVE-2026-72794 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-72794 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-72794? Upgrade github.com/siyuan-note/siyuan/kernel to 0.0.0-20260725123945-77421530be4a or later.

Stop the waste.
Protect your environment with Kodem.