CVE-2026-30869 — SiYuan Vulnerable to Path Traversal in...
SiYuan Vulnerable to Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (1.31%). 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-30869 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.
Summary
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) bypassesServeFiledot-dot URL rejection but is decoded by app logic into ... CheckAuthgrants 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:
-
Send a GET request to
/export/%252e%252e/%252e%252e/conf/conf.jsonorexport/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd -
If HTTP 200 is returned, inspect the response body for sensitive fields:
api.token
cookieKey
accessAuthCode
or
/etc/passwd
- (Optional) If api.token is present, test admin API access:
POST /api/system/getNetwork
Header: Authorization: Token <leaked token>
- 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.
Advisory Timeline
- First published March 7, 2026 (264 days ago).
- Last revised November 5, 2026 — 244 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/siyuan-note/siyuan/kernel@v3.5.10
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/siyuan-note/siyuan/kernel Go · Affected: All versions | 3.5.10 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L
References
Frequently Asked Questions
- What is CVE-2026-30869?
- SiYuan Vulnerable to Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.3/10).
- How do I check if my project is affected by CVE-2026-30869?
- CVE-2026-30869 affects github.com/siyuan-note/siyuan/kernel. It has a 1.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-30869 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 70.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-25539CRITICAL
SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE
- CVE-2026-69083CRITICAL
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-32938CRITICAL
SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service
- CVE-2026-68587HIGH
SiYuan: Full-content disclosure of publish-disabled documents via getHeading*Transaction endpoints (publish mode): reader-reachable rendered DOM with no publish-access check
- CVE-2026-68584HIGH
SiYuan: Anonymous publish-password authentication bypass via getHeadingChildrenDOM / getHeading*Transaction / getBacklinkDoc (publish mode)
- CVE-2026-66394HIGH
SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass
- CVE-2026-73608HIGH
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-34585HIGH
SiYuan Desktop: Stored XSS in imported .sy.zip content leads to arbitrary command execution