ZeroHour

CVE-2026-85175

Private Key Disclosure in SiYuan 3.8.1 and Earlier via Incomplete Path Blocklist

CVSS 4.0
8.7 high
EPSS
<1%p9
Published
()
Modified
AI analysis

SiYuan versions 3.8.1 and earlier contain an incomplete blocklist in the IsForbiddenAbsPath() function (kernel/util/path_guard.go) that only blocks conf/conf.json by exact match, leaving the TLS private key (conf/key.pem) and CA private key (conf/ca.key) in the same conf/ directory readable. The vulnerability is triggered through the /api/file/getFile handler, which skips the blocklist for RoleAdministrator, and because all authenticated users are granted RoleAdministrator in v3.8.1, any user — or any client on a default no-auth-code instance — can retrieve these private keys via a POST to /api/file/getFile. On deployments with TLS enabled, an attacker with network access to the instance can use key.pem to decrypt captured HTTPS traffic and ca.key to forge certificates trusted by clients that imported SiYuan's CA. All SiYuan deployments running 3.8.1 or earlier are affected, with the greatest impact on network-reachable instances, particularly those without an access authorization code. No public proof-of-concept, KEV listing, or in-the-wild exploitation is known; EPSS estimates only a 0.2% probability of exploitation in the next 30 days.

What to do: Upgrade to SiYuan v3.8.2 or later, which restricts reads of conf/key.pem and conf/ca.key. Until upgraded, limit network exposure of the instance (bind to localhost or restrict via firewall) and set an access authorization code so that anonymous clients cannot call /api/file/getFile. If an instance was network-accessible with TLS enabled, treat key.pem and ca.key as potentially compromised and rotate the TLS key and CA key, re-issuing any certificates trusted by clients.

Affected
SiYuan<= 3.8.1 (fixed in v3.8.2)
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

SiYuan versions <= 3.8.1 (fixed in v3.8.2) contain an incomplete blocklist in the IsForbiddenAbsPath() function (kernel/util/path_guard.go), which only blocks conf/conf.json by exact match and does not restrict the TLS private key (conf/key.pem) or CA private key (conf/ca.key) stored in the same conf/ directory. Because the getFile handler skips the blocklist for RoleAdministrator and all authenticated users receive RoleAdministrator in v3.8.1, any user (or any client on a default no-auth-code instance) can retrieve these private keys via POST /api/file/getFile. On deployments with TLS enabled, this allows decryption of captured HTTPS traffic (key.pem) and forging of certificates trusted by clients that imported SiYuan's CA (ca.key).

Weakness
CWE-552
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.