Skip to main content

CVE-2026-72793 — Vulnerability in siyuan-note/siyuan/kernel

HIGH

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

Published September 4, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.41%). Schedule for your next planned update.

Does your project use an affected github.com/siyuan-note/siyuan/kernel version?

Paste your go.sum to check it for CVE-2026-72793 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

CVE: This vulnerability corresponds to 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:

FieldJSONWhat it isCleared by exportConf at
Conf.CookieKeycookieKeyThe session-cookie signing keykernel/api/system.go:360
Conf.Export.PandocBinexport.pandocBinAbsolute path embedding the OS usernamekernel/api/system.go:338
Conf.NotebookCryptonotebookCryptoEncrypted-notebook key materialkernel/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:

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.

Advisory Timeline

  • First published September 4, 2026 (83 days ago).
  • Last revised September 10, 2026 — 6 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/siyuan-note/siyuan/kernel to 0.0.0-20260725132049-2d8b98395a91 or later
go get github.com/siyuan-note/siyuan/kernel@v0.0.0-20260725132049-2d8b98395a91

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Go (1).

PackageFixed In
github.com/siyuan-note/siyuan/kernel Go · Affected: All versions0.0.0-20260725132049-2d8b98395a91

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Frequently Asked Questions

What is CVE-2026-72793?
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. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2026-72793?
CVE-2026-72793 affects github.com/siyuan-note/siyuan/kernel. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-72793 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.41%
EPSS percentile: 26.8

This is a below-median EPSS score — only 26.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-h4v5-crx2-3cv4
GO-2026-6424

Related CVEs

  • CVE-2026-25539
    CRITICAL

    SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE

  • CVE-2026-69083
    CRITICAL

    SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB

  • CVE-2026-32938
    CRITICAL

    SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service

  • CVE-2026-68584
    HIGH

    SiYuan: Anonymous publish-password authentication bypass via getHeadingChildrenDOM / getHeading*Transaction / getBacklinkDoc (publish mode)

  • CVE-2026-66394
    HIGH

    SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass

  • CVE-2026-73608
    HIGH

    SiYuan: getAttributeViewSearchTarget returns database row content to anonymous readers with no publish-access check, reopening the class closed one day earlier at the adjacent route

  • CVE-2026-34585
    HIGH

    SiYuan Desktop: Stored XSS in imported .sy.zip content leads to arbitrary command execution

  • CVE-2026-72795
    HIGH

    SiYuan: Embedded (transclusion) block content is returned without publish-access filtering, leaking private and password-protected document content to anonymous readers

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum