ZeroHour

CVE-2026-72794

moderate

Session-cookie signing key disclosed to anonymous users in SiYuan

CVSS 4.0
9.2 critical
EPSS
<1%p16
Published
()
Modified
AI analysis

SiYuan's POST /api/system/getConf endpoint returns the server's session-cookie signing key (Conf.CookieKey, serialized as cookieKey) in its response body, because the route is gated only by CheckAuth with no admin-role requirement, so the field reaches publish RoleReader tokens and fully anonymous readers when Publish.Auth.Enable is false. None of the configuration-masking layers (GetMaskedConf, HideConfSecret, FilterConfByPublishIgnore, or the browser-side System-path strip) removes this field, even though the sibling exportConf endpoint explicitly clears it as a secret. Since the key is used at startup as the gorilla/securecookie HMAC key for the 'siyuan' session cookie, an attacker who obtains it can mint or tamper with session cookies that the server accepts as authentic; full privilege escalation to administrator additionally requires a matching AccessAuthCode, which is masked, or an instance without one configured. Any self-hosted SiYuan instance in server mode that exposes this API to unauthenticated or reader-level users is affected; specific affected version ranges are not provided in the available data. No public proof-of-concept, KEV listing, or in-the-wild exploitation is known, and EPSS estimates only about a 0.2% chance of exploitation within 30 days.

What to do: Upgrade SiYuan to a release that strips CookieKey from /api/system/getConf once available, and if your instance was internet-exposed, rotate the cookie signing key so any leaked value is invalidated. As interim mitigation, restrict access to /api/system/getConf at a reverse proxy, enable Publish.Auth.Enable, and ensure an AccessAuthCode is configured to cap forged sessions at reader level.

Affected
B3log / SiYuan project SiYuan (kernel, Go server)
Estimated exposure
moderateplausibly on the order of a few thousand internet-exposed SiYuan server instances (unknown precisely) — SiYuan is a widely used open-source self-hosted knowledge-base app (tens of thousands of GitHub stars), but most users run it as a local desktop app, so only the subset deployed in server mode with publish or anonymous API access…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

siyuan versions before v3.7.4 expose the session cookie signing key through the /api/system/getConf endpoint to unauthenticated users in publish mode. Attackers can retrieve the CookieKey value and forge valid session cookies to impersonate users or gain administrative access.

Ecosystems
go
Weakness
CWE-522
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
GHSA
GHSA-34fj-mwm6-fjfg (high)

In the news

No ingested article mentions this CVE yet.