Executive brief
Siyuan is a note-taking application with network-accessible APIs. An unauthenticated attacker can retrieve the server's session cookie signing key from the /api/system/getConf endpoint, allowing them to forge valid session cookies and impersonate any user or administrator on the system. This cryptographic secret cannot be changed without invalidating all active user sessions.
Technical details
The /api/system/getConf endpoint is protected only by CheckAuth middleware and returns the Conf.CookieKey field in its response body to anonymous users when Publish.Auth.Enable is false or to any publish RoleReader account. This key is used to sign the server's session cookies via gorilla/securecookie HMAC. The vulnerability exists because CookieKey is not filtered by the HideConfSecret() or FilterConfByPublishIgnore() masking functions in the response path, despite being explicitly stripped by the guarded exportConf endpoint. An attacker can call POST /api/system/getConf with no credentials to obtain the cleartext signing key, then use it to forge valid session cookies. On instances without an access-auth code configured, this enables authentication as a privileged user. The disclosed key is a persistent cryptographic secret that cannot be remediated without invalidating all active sessions.
Affected products
- Siyuan Note Siyuan <= 3.7.2
Timeline
- 2026-07-25: disclosed
- 2026-08-12: advisory
- 2026-09-04: other: This advisory (GHSA-hg4j-w33m-p7g4) was withdrawn as a duplicate of GHSA-34fj-mwm6-fjfg