CVE-2026-54066 Overview
CVE-2026-54066 is a path traversal vulnerability in SiYuan, an open-source personal knowledge management system. The flaw exists in the /assets/*path route prior to version 3.7.0. A previous patch for CVE-2026-41894 addressed the same root cause in the /export/ route but left the /assets/ route exposed. When SiYuan runs in publish mode on default port 6808, an unauthenticated remote attacker can read arbitrary files within WorkspaceDir by double-URL-encoding .. segments. Targeted files include conf/conf.json, temp/siyuan.db, temp/blocktree.db, and siyuan.log. The vulnerability is tracked as [CWE-22] Path Traversal.
Critical Impact
Unauthenticated remote attackers can read the AccessAuthCode SHA256 hash, API token, and sync keys stored in conf/conf.json, enabling full compromise of the publish mode instance.
Affected Products
- SiYuan personal knowledge management system versions prior to 3.7.0
- Instances running in publish mode with the anonymous read-only HTTP endpoint exposed
- Default deployments listening on port 6808
Discovery Timeline
- 2026-06-24 - CVE-2026-54066 published to NVD
- 2026-06-25 - Last updated in NVD database
Technical Details for CVE-2026-54066
Vulnerability Analysis
The vulnerability resides in SiYuan's HTTP routing layer, specifically the handler servicing the /assets/*path route. SiYuan's publish mode exposes an anonymous, read-only HTTP endpoint intended to share notebooks publicly. The asset handler resolves request paths relative to WorkspaceDir without normalizing percent-encoded sequences before performing path traversal checks.
When a request contains double-URL-encoded .. segments such as %252e%252e%252f, the routing layer decodes the path once during HTTP parsing. The remaining encoded layer bypasses the traversal filter. The handler then performs a second decoding pass when constructing the filesystem path, restoring the .. sequences and resolving them against WorkspaceDir.
The maintainers previously fixed the identical class of bug for the /export/ route as CVE-2026-41894. That patch did not cover the /assets/ handler, leaving the same defect exploitable through a different endpoint.
Root Cause
The root cause is incomplete input validation. The sanitization logic checks for literal .. substrings after a single decoding pass instead of fully canonicalizing the request path. Double encoding defeats the check, allowing attacker-controlled path components to escape WorkspaceDir.
Attack Vector
The attack requires only network access to a SiYuan instance running in publish mode. The attacker sends a crafted GET request to /assets/ followed by double-URL-encoded traversal sequences pointing at sensitive workspace files. No authentication, user interaction, or local access is required. Successful exploitation discloses conf/conf.json, which contains the AccessAuthCode hash, the API token, and sync keys, enabling further account compromise and data exfiltration.
No verified proof-of-concept code is published in the references. The GitHub Security Advisory GHSA-p4m3-mgmm-c664 provides additional technical context.
Detection Methods for CVE-2026-54066
Indicators of Compromise
- HTTP requests to /assets/ containing double-encoded sequences such as %252e%252e%252f or %252E%252E%252F
- Access log entries showing /assets/ requests targeting filenames like conf.json, siyuan.db, blocktree.db, or siyuan.log
- Outbound connections from unknown IP addresses to TCP port 6808 on hosts running SiYuan
- Unexpected use of the AccessAuthCode or API token from new geolocations following suspicious /assets/ traffic
Detection Strategies
- Inspect web server and reverse proxy logs for repeated percent-encoded characters (%25) inside /assets/ request paths
- Decode request URIs at the WAF or proxy layer and alert on resolved paths containing .. after recursive decoding
- Compare baseline file access patterns for WorkspaceDir against runtime telemetry to flag reads of configuration and database files served over HTTP
Monitoring Recommendations
- Enable verbose HTTP access logging on SiYuan and any fronting reverse proxy, retaining full request URIs
- Monitor for SiYuan version strings below 3.7.0 in asset inventories and patch management systems
- Alert on any external access to TCP port 6808 from networks outside an approved publish-mode allowlist
How to Mitigate CVE-2026-54066
Immediate Actions Required
- Upgrade all SiYuan instances to version 3.7.0 or later, which contains the official fix
- Rotate the AccessAuthCode, API token, and sync keys stored in conf/conf.json after patching, assuming exposure
- Restrict network access to TCP port 6808 to trusted networks until the upgrade is completed
- Review HTTP access logs for prior exploitation attempts using double-encoded traversal sequences
Patch Information
The maintainers fixed CVE-2026-54066 in SiYuan 3.7.0 by extending the path sanitization applied to the /export/ route to the /assets/*path handler. Details are published in the GitHub Security Advisory GHSA-p4m3-mgmm-c664.
Workarounds
- Disable publish mode until the upgrade to 3.7.0 is applied
- Place SiYuan behind a reverse proxy that recursively URL-decodes request paths and blocks any resolved path containing ..
- Bind the SiYuan service to localhost or a private interface and require VPN access for remote users
# Example nginx rule to block double-encoded traversal on the /assets/ route
location /assets/ {
if ($request_uri ~* "%25(2e|2E){2}") { return 403; }
if ($request_uri ~* "\.\./") { return 403; }
proxy_pass http://127.0.0.1:6808;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

