highCVSS 7.5Vulnerability

CVE-2026-54066

## Summary The patch for CVE-2026-41894 ("Path Traversal via Double URL Encoding") sanitized the `/export/` route but the **identical root cause remains in the `/assets/*path` route**. In publish mode (anonymous read-only HTTP endpoint, default port 6808), an unauthenticated remote attacker can read arbitrary files inside `WorkspaceDir` — including `conf/conf.json` (which contains the `AccessAuthCode` SHA256 hash, API token, and sync keys), `temp/siyuan.db`, `temp/blocktree.db`, and `siyuan.log` — by double-URL-encoding `..` segments. Verified against siyuan v3.6.5: - `GET /assets/%252e%252e/%252e%252e/conf/conf.json` → **HTTP 200, 10349 bytes (conf.json served)** - `GET /export/%252e%252e/%252e%252e/conf/conf.json` → HTTP 401 (patched) - `GET /assets/%2e%2e/conf/conf.json` → HTTP 404 (single-decode handled correctly) ## Vulnerable Code **Step 1 — route & first decode** (`kernel/server/serve.go:587-626`): The router registers `GET /assets/*path` for the publish listener. Gin performs one URL decoding pass on `URL.Path`, so a request for `/assets/%252e%252e/...` yields `context.Param("path") == "/%2e%2e/%2e%2e/conf/conf.json"` — literal `%2e%2e` strings, which `path.Clean` cannot collapse. **Step 2 — second decode via fallback** (`kernel/model/assets.go:536-563`, `GetAssetAbsPath`): ```go p, err := getAssetAbsPath(relativePath) if nil != err { // fallback decoded, e := url.PathUnescape(relativePath) // ← line 548, second decode if nil == e { p, err = getAssetAbsPath(decoded) } } ``` After the fallback decodes `%2e%2e` to `..`, `filepath.Join(DataDir, "../../conf/conf.json")` is `Clean`-ed to `WorkspaceDir/conf/conf.json`, an existing file. **Step 3 — publish-mode access gate fall-through** (`kernel/model/publish_access.go:288`, `CheckAbsPathAccessableByPublishAccess`): ```go if !filelock.IsSubPath(util.DataDir, absPath) { return true // ← fall-through allows anything

Properties

summary
SiYuan: Path Traversal via Double URL Encoding in /assets/*path (publish mode arbitrary file─read), Incomplete fix of CVE-2026-41894
severity
high
epss_score
0.02386
cvss_score
7.5
ghsa_published
2026-07-10T19:25:04Z
source_url
https://github.com/advisories/GHSA-p4m3-mgmm-c664
ghsa_updated
2026-07-10T19:25:04Z
ghsa_id
GHSA-p4m3-mgmm-c664
cve_id
CVE-2026-54066
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
is_ghsa_only
false
epss_percentile
0.82642

Related Entities (7)

ENRICHED_BY (1)

[Source]FIRST EPSS

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]go/github.com/siyuan-note/siyuan/kernel

AFFECTS (1)

[Software]go/github.com/siyuan-note/siyuan/kernel

HAS_WEAKNESS (3)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
[Weakness]Initialization of a Resource with an Insecure Default
[Weakness]Relative Path Traversal

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-54066 (CVSS 7.5) — Ninja Signal Threat Intelligence | Ninja Signal