CVE-2026-30869: Github.com/siyuan note/siyuan/kernel Path Traversal Vulnerability

CRITICAL
Advisory Identifier: GHSA-2h2p-mvfx-868w
CVSS 9.3
CWE-285 CWE-200 CWE-22
Published
Advisory Summary

CVE-2026-30869 is a CRITICAL (CVSS 9.3) path traversal vulnerability (CWE-285: Improper Authorization) affecting Github.com/siyuan note/siyuan/kernel libraries in the Go ecosystem. The issue involves siyuan vulnerable to path traversal in /export endpoint allows arbitrary file read and secret leakage. Remediation is available by upgrading affected packages to version 3.5.10.

CVE-2026-30869 at a Glance

CVE Identifier CVE-2026-30869
GHSA Identifier GHSA-2h2p-mvfx-868w
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-285: Improper Authorization
Affected Product Github.com/siyuan note/siyuan/kernel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-30869

To remediate this vulnerability, upgrade all affected Github.com/siyuan note/siyuan/kernel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/siyuan-note/siyuan/kernel fixed: 3.5.10
Upgrade github.com/siyuan-note/siyuan/kernel to 3.5.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-30869, inspect your project dependencies for Github.com/siyuan note/siyuan/kernel:

inspect dependencies for github.com/siyuan-note/siyuan/kernel

Analyze the terminal output to locate any version of Github.com/siyuan note/siyuan/kernel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.10), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Github.com/siyuan note/siyuan/kernel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](app://-/index.html?hostId=local#), [session.go](app://-/index.html?hostId=local#) 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.

CVE-2026-30869 Affected Github.com/siyuan note/siyuan/kernel Versions

1 component(s)
Fixed Versions:
3.5.10
Product / Package Ecosystem Affected Versions Fixed Version
github.com/siyuan-note/siyuan/kernel
Go
< 3.5.10
3.5.10

References

Frequently Asked Questions

What is CVE-2026-30869?
CVE-2026-30869 is a security vulnerability in Github.com/siyuan note/siyuan/kernel involving SiYuan Vulnerable to Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage under CWE-285: Improper Authorization.
Which Github.com/siyuan note/siyuan/kernel versions are affected?
Affected versions include releases prior to 3.5.10 across affected packages: github.com/siyuan-note/siyuan/kernel.
What version fixes CVE-2026-30869?
Upgrading to 3.5.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/siyuan-note/siyuan/kernel affected?
Yes, github.com/siyuan-note/siyuan/kernel is affected in releases prior to 3.5.10. Upgrade your dependency to 3.5.10 or later.
What is the CVSS score of CVE-2026-30869?
CVE-2026-30869 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L.
What CWE is associated with CVE-2026-30869?
CVE-2026-30869 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-30869?
Run the dependency tree command: 'inspect dependencies for github.com/siyuan-note/siyuan/kernel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2h2p-mvfx-868w",
  "modified" : "2026-03-10T18:43:18Z",
  "published" : "2026-03-07T02:19:45Z",
  "aliases" : [ "CVE-2026-30869" ],
  "summary" : "SiYuan Vulnerable to Path Traversal in /export Endpoint Allows Arbitrary File Read and Secret Leakage",
  "details" : "### Summary\nA 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.\n\nLeaking 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)`.\n\n### Details\nFile: [serve.go](app://-/index.html?hostId=local#), [session.go](app://-/index.html?hostId=local#)\nLines: serve.go 303, 315, 320, 340, 955-957; session.go 292-295\n\nVulnerable Code:\n```\n// session.go\nif localhost {\n    if strings.HasPrefix(c.Request.RequestURI, \"/assets/\") || strings.HasPrefix(c.Request.RequestURI, \"/export/\") {\n        c.Set(RoleContextKey, RoleAdministrator)\n        c.Next()\n        return\n    }\n}\n\n// serve.go\nfilePath := strings.TrimPrefix(c.Request.URL.Path, \"/export/\")\ndecodedPath, err := url.PathUnescape(filePath)\nfullPath := filepath.Join(exportBaseDir, decodedPath)\nc.File(fullPath)\n\n// CORS\nc.Header(\"Access-Control-Allow-Origin\", \"*\")\n\n```\nPoints of Vulnerability:\n\n- `/export/*` trusts url.PathUnescape output and joins it without enforcing fullPath to stay under exportBaseDir.\n- Double-encoded traversal (`%252e%252e`) bypasses `ServeFile` dot-dot URL rejection but is decoded by app logic into ...\n- `CheckAuth` grants admin for localhost requests to `/export/*` when access auth code is set.\n- Global CORS `Access-Control-Allow-Origin: *` allows hostile web pages to read localhost responses.\n\n### PoC\n\nReproduction Steps:\n\n1. 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`\n\n2. If HTTP 200 is returned, inspect the response body for sensitive fields:\n```\napi.token\ncookieKey\naccessAuthCode\n```\nor\n```\n/etc/passwd\n```\n\n3. (Optional) If api.token is present, test admin API access:\n```\nPOST /api/system/getNetwork\nHeader: Authorization: Token <leaked token>\n```\n\n4. Confirm that the response indicates administrative privileges.\nAll steps can be performed with read-only HTTP requests; no Docker or local modifications are needed.\n### Impact\n\nThis vulnerability can lead to serious compromise of a SiYuan instance, including:\n\n**Arbitrary File Disclosure**\n- Attackers can read files anywhere on the server filesystem, including system files such as /etc/passwd.\n\n**Exposure of Sensitive Secrets**\n- Configuration files such as conf/conf.json contain sensitive information including:\n- API tokens\n- cookie signing keys\n- workspace authentication codes\n\n**Administrative API Access**\n- Leaked tokens can allow attackers to interact with privileged SiYuan kernel APIs.\n\n**Cross‑Origin Localhost Data Exfiltration**\n- 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.\n\n**Potential Remote Code Execution (RCE)**\n- 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/siyuan-note/siyuan/kernel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.5.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.9"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-2h2p-mvfx-868w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30869"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/siyuan-note/siyuan"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-22", "CWE-285" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-07T02:19:45Z",
    "nvd_published_at" : "2026-03-10T17:40:14Z"
  }
}