CVE-2026-30869: SiYuan has a Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage

Published Mar 7, 2026
·
Updated

Summary A path traversal vulnerability in the /export endpoint allows an attacker to read arbitrary files from the server filesystem. By exploiting double‑encoded traversal sequences, an attacker can access sensitive files such as conf/conf.json, which contains secrets including the API token, cookie signing key, and workspace access authentication code.

Leaking these secrets may enable administrative access to the SiYuan kernel API, and in certain deployment scenarios could potentially be chained into remote code execution (RCE).

Details File: serve.go, session.go Lines: serve.go 303, 315, 320, 340, 955-957; session.go 292-295

Vulnerable Code: // session.go if localhost { if strings.HasPrefix(c.Request.RequestURI, "/assets/") || strings.HasPrefix(c.Request.RequestURI, "/export/") { c.Set(RoleContextKey, RoleAdministrator) c.Next() return } }

// serve.go filePath := strings.TrimPrefix(c.Request.URL.Path, "/export/") decodedPath, err := url.PathUnescape(filePath) fullPath := filepath.Join(exportBaseDir, decodedPath) c.File(fullPath)

// CORS c.Header("Access-Control-Allow-Origin", "")

Points of Vulnerability:

- /export/ trusts url.PathUnescape output and joins it without enforcing fullPath to stay under exportBaseDir. - Double-encoded traversal (%252e%252e) bypasses ServeFile dot-dot URL rejection but is decoded by app logic into ... - CheckAuth grants admin for localhost requests to /export/ when access auth code is set. - Global CORS Access-Control-Allow-Origin: allows hostile web pages to read localhost responses.

PoC

Reproduction Steps:

1. Send a GET request to /export/%252e%252e/%252e%252e/conf/conf.json or export/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd

2. If HTTP 200 is returned, inspect the response body for sensitive fields: api.token cookieKey accessAuthCode or /etc/passwd

3. (Optional) If api.token is present, test admin API access: POST /api/system/getNetwork Header: Authorization: Token <leaked token>

4. Confirm that the response indicates administrative privileges. All steps can be performed with read-only HTTP requests; no Docker or local modifications are needed. Impact

This vulnerability can lead to serious compromise of a SiYuan instance, including:

Arbitrary File Disclosure - Attackers can read files anywhere on the server filesystem, including system files such as /etc/passwd.

Exposure of Sensitive Secrets - Configuration files such as conf/conf.json contain sensitive information including: - API tokens - cookie signing keys - workspace authentication codes

Administrative API Access - Leaked tokens can allow attackers to interact with privileged SiYuan kernel APIs.

Cross‑Origin Localhost Data Exfiltration - Because the server sets Access-Control-Allow-Origin: , a malicious website can exploit the vulnerability to read files from a victim's local SiYuan instance running on 127.0.0.1.

Potential Remote Code Execution (RCE) - Disclosure of authentication secrets and internal configuration may enable attackers to chain this vulnerability with other application features or APIs to achieve remote code execution or full system compromise.

Other sources

SiYuan is a personal knowledge management system. Prior to 3.5.10, a path traversal vulnerability in the /export endpoint allows an attacker to read arbitrary files from the server filesystem. By exploiting double‑encoded traversal sequences, an attacker can access sensitive files such as conf/conf.json, which contains secrets including the API token, cookie signing key, and workspace access authentication code. Leaking these secrets may enable administrative access to the SiYuan kernel API, and in certain deployment scenarios could potentially be chained into remote code execution (RCE). This vulnerability is fixed in 3.5.10.

MITRE

Affected Software

2 affected componentsFixes available
go/github.com/siyuan-note/siyuan/kernel<=3.5.9
3.5.10
b3log SiYuan<3.5.10

Event History

Mar 7, 2026
Advisory Published
via GitHub·02:19 AM
Data Sourced
via GitHub·02:19 AM
DescriptionSeverityWeaknessAffected Software
Mar 9, 2026
CVE Published
via MITRE·10:28 PM
Data Sourced
via MITRE·10:28 PM
DescriptionSeverityWeakness
Mar 10, 2026
Data Sourced
via NVD·05:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-30869?

CVE-2026-30869 has been assessed with a high severity level due to its potential for arbitrary file read and secret leakage.

2

How do I fix CVE-2026-30869?

To fix CVE-2026-30869, you need to upgrade SiYuan to version 3.5.10 or later.

3

Which versions of SiYuan are affected by CVE-2026-30869?

CVE-2026-30869 affects SiYuan versions up to and including 3.5.9.

4

What is the nature of the attack vector in CVE-2026-30869?

The attack vector for CVE-2026-30869 involves exploiting a path traversal vulnerability in the /export endpoint.

5

What could be the impact of exploiting CVE-2026-30869?

Exploiting CVE-2026-30869 can lead to unauthorized access to sensitive files on the server, resulting in potential data leakage.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203