Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach SiYuan API over network
-
DeliveryAuthenticate or exploit no-auth default
-
ExploitPOST /api/file/getFile with conf/key.pem path
-
ExecutionRoleAdministrator assignment bypasses blocklist
-
PersistRetrieve TLS private key and CA private key
-
ImpactDecrypt HTTPS sessions or forge trusted certificates
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling File access restriction
MITRE ATT&CK
2 techniques across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Network access to the SiYuan HTTP/HTTPS API port is required. On default no-auth-code instances (the out-of-the-box configuration), no credentials are required - any network-reachable client can make the POST /api/file/getFile request. On instances where an access code has been configured, any user who can authenticate is affected, because v3.8.1 assigns RoleAdministrator to every authenticated session, which causes the getFile handler to skip the blocklist entirely. The full cryptographic impact (HTTPS traffic decryption and CA-signed certificate forgery) requires TLS to be enabled on the SiYuan instance (conf/key.pem and conf/ca.key must exist). Instances running on localhost only, without TLS, or isolated from untrusted networks are at significantly reduced risk from the key-material compromise angle, though the file disclosure defect is present in all <=3.8.1 deployments. |
| Impact | The vendor-assigned CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) is largely defensible, with one notable concern: the VA:H (high availability impact on the vulnerable system) component is not directly supported by the description, which identifies no mechanism for service disruption - key compromise forces operational key rotation and certificate revocation, but that is an administrative consequence rather than an availability impact caused by the exploit itself. VC:H and VI:H are well-grounded: exfiltrating the TLS private key enables decryption of captured HTTPS traffic (confidentiality), and exfiltrating the CA key enables signing of fraudulent trusted certificates (integrity). Real-world risk is highest for network-exposed, TLS-enabled SiYuan instances, particularly shared or team deployments. Default no-auth-code configurations effectively remove even the PR:L barrier, making exploitation trivially easy for any network-adjacent attacker - closer to PR:N than the vector implies. EPSS data was not provided; the vulnerability is not listed in CISA KEV; no public proof-of-concept code has been identified. Self-hosted, localhost-only, or non-TLS deployments face reduced cryptographic risk but remain vulnerable to file disclosure. |
| Exploit ScenarioDerived | An attacker connected to the network hosting a SiYuan v3.8.1 instance - with either a valid session or no credentials on a default no-auth-code deployment - sends a single POST request to /api/file/getFile specifying the path conf/key.pem; the incomplete blocklist passes the request, and because the handler treats the caller as RoleAdministrator it returns the raw TLS private key. The attacker repeats the request for conf/ca.key, then uses the recovered private key to decrypt previously captured TLS-encrypted sessions between SiYuan and its users, and uses ca.key to sign malicious certificates that client browsers already trust. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 03, 2026
TLS private key disclosure in SiYuan <=3.8.1 allows any authenticated user - or any network client on default no-auth-code deployments - to exfiltrate the server's TLS private key (conf/key.pem) and CA private key (conf/ca.key) via a simple POST to /api/file/getFile. The root cause is a dual flaw: the IsForbiddenAbsPath() blocklist covers only conf/conf.json by exact match while leaving sibling key material unprotected, and the getFile handler unconditionally skips the blocklist for RoleAdministrator - a role granted to every authenticated user in v3.8.1. On TLS-enabled, network-exposed instances this enables retrospective decryption of captured HTTPS sessions and forgery of certificates already trusted by clients that imported SiYuan's CA. No public exploit identified at time of analysis; vendor-confirmed fix is available in v3.8.2.
RemediationAI
The primary fix is upgrading to SiYuan v3.8.2, which corrects the incomplete blocklist in IsForbiddenAbsPath() to include conf/key.pem and conf/ca.key, per GitHub Security Advisory GHSA-4wwp-f6gw-6qm5 (https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4wwp-f6gw-6qm5). If immediate upgrade is not feasible, restrict network access to the SiYuan API server using firewall rules or a reverse proxy, blocking or rate-limiting POST /api/file/getFile from untrusted sources - note this does not fix the underlying flaw and trusted users can still exploit it. Additionally, for any network-exposed instance that may have been targeted prior to patching, treat the TLS key pair and CA key as compromised: regenerate both, re-issue server certificates, and instruct all users who imported SiYuan's CA certificate to remove and replace it with the newly generated one. For default no-auth-code deployments, configure an access code immediately to add an authentication barrier while awaiting the upgrade. The VulnCheck advisory is also available at https://www.vulncheck.com/advisories/siyuan-before-3.8.2-tls-private-key-disclosure-via-getfile.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SiYuan is a self-hosted, open-source personal knowledge management application whose backend kernel exposes an HTTP API. The vulnerable component is kernel/util/path_guard.go, which implements IsForbiddenAbsPath() - a string-exact-match blocklist that gates the POST /api/file/getFile endpoint. CWE-552 (Files or Directories Accessible to External Parties) precisely identifies the root cause: sensitive files co-located with the blocked file in the conf/ directory (specifically conf/key.pem, the server TLS private key, and conf/ca.key, the internal CA private key) are simply absent from the blocklist. A compounding design defect makes this worse: the getFile handler checks the blocklist only for non-administrator roles, but v3.8.1 assigns RoleAdministrator to every authenticated user, causing the blocklist to be bypassed entirely for all authenticated requests. On instances where no auth code is configured (the default), authentication is not required at all, making the effective privilege level PR:N. Affected CPE: cpe:2.3:a:siyuan-note:siyuan:*:*:*:*:*:*:*:* for all versions through 3.8.1.
Know when Siyuan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-accessible POST endpoint; low privilege (any authenticated user, effectively none on default no-auth instances); C:H for key disclosure, I:H for CA forgery; A:N as no availability impact mechanism is described.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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).
Technical POC Analysis
This is an incomplete-access-control bug in the file-serving path (CWE-552).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
SiYuan note-taking application versions 3.8.1 and earlier expose the server's TLS private keys through an access-control vulnerability that bypasses authentication protections on default configurations and affects all authenticated users. This enables attackers to decrypt all historical HTTPS traffic and forge server certificates, resulting in complete loss of confidentiality for encrypted communications since deployment. Organizations running TLS-enabled SiYuan instances face exposure of sensitive data transmitted across all prior encrypted sessions.
Apply vendor patch: SiYuan v3.8.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role
Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,
SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
EUVD-2026-70410
GHSA-gg9w-4vv2-vjcm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB