/

CVE-2026-72794

Severity:

HIGH RISK

(8.6)

Session Key Exposure (CWE-522) in Siyuan Publish Mode

CVE-2026-72794

Deferred

Vulnerability type

Category:

Credential and Secret Exposure

CWE:

CWE-522

Impact:

Session Hijacking and Privilege Escalation

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Siyuan versions before v3.7.4 expose the session cookie signing key through an unauthenticated configuration endpoint when running in publish mode. An attacker who obtains this key may forge valid session cookies to impersonate users or gain administrative access.

Affected context

The vulnerability occurs in Siyuan deployments operating in publish mode when the

/api/system/getConf endpoint is accessible without authentication and includes the

CookieKey value in its response. Deployments that expose this endpoint to untrusted

users or the public internet may be at greater risk because the signing key can be

recovered without an existing session.

Exploit preconditions

  • Attack surface: The /api/system/getConf HTTP endpoint
  • Required access: Network access to the endpoint; authentication may not be required
  • Trigger point: Retrieval of configuration data while Siyuan is running in publish mode
  • Why exploitation is possible: The response discloses the secret used to sign session cookies, allowing attackers to create cookies that the application may accept as valid

Why this happens

The underlying issue is exposure of a session-signing secret through an endpoint intended

to provide configuration information. This represents CWE-522: Insufficiently Protected Credentials, because a credential-like secret is disclosed to unauthenticated clients.

Once the signing key is exposed, the application's trust in signed session cookies can be

bypassed through forged authentication tokens.

Potential impact

  • Attackers may impersonate authenticated users
  • Attackers could obtain administrative access
  • Active sessions may be forged or hijacked
  • Unauthorized users may modify application data or configuration
  • Compromise could enable further access to connected systems or stored information

General mitigation guidance

Mitigation generally focuses on preventing secret material from being returned through

public configuration endpoints and reducing the trust placed in exposed credentials.

Common defensive patterns include:

  • Returning only explicitly public configuration fields to unauthenticated clients
  • Keeping session-signing keys and other secrets outside client-visible responses
  • Requiring authentication and authorization for sensitive configuration endpoints
  • Rotating session-signing secrets after suspected disclosure
  • Invalidating sessions issued under a potentially exposed signing key
  • Applying least-privilege access controls and limiting publish-mode exposure
  • Using centralized secret management with restricted read permissions

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review rules that flag secret fields in API responses
  • Tests verifying that unauthenticated configuration endpoints contain only allowlisted data
  • API inventory reviews focused on publish-mode and public deployment surfaces
  • Runtime monitoring for unusual access to configuration endpoints
  • Detection of anomalous session creation, administrative activity, or authentication from unexpected locations
  • Policy enforcement preventing credentials, signing keys, and tokens from entering client-facing responses

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-34fj-mwm6-fjfg
vulncheck.comvulncheck.com/advisories/siyuan-before-session-cookie-key-disclosure-via-getconf

Frequently asked

questions

Yes, when the vulnerable configuration endpoint is reachable over the network and

publish mode exposes the session-signing key without authentication.

Not necessarily. Access to the affected endpoint may be sufficient to obtain the key,

after which forged session cookies could be used to impersonate users.

Ensure that session-signing secrets are never included in unauthenticated responses,

protect configuration endpoints with authorization, and rotate any key that may have

been disclosed.

Use explicit response allowlists, automated tests for secret leakage, centralized secret

management, and monitoring for suspicious configuration access and forged-session behavior.

Find out what's already
exploitable in your codebase.