SiYuan
CVE-2026-59854
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain SiYuan admin credentials or API token
-
DeliverySend POST /api/file/globalCopyFiles with absolute credential file path
-
ExploitBypass incomplete denylist in util.IsSensitivePath
-
ExecutionCredential file copied into workspace
-
PersistRetrieve file contents via SiYuan file API
-
ImpactExfiltrate host credentials for lateral movement
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
|
| Exploitation Conditions | Exploitation requires an authenticated session with administrator-level privileges or a valid SiYuan API token - PR:H per the CVSS vector. The attacker must be able to reach the POST /api/file/globalCopyFiles endpoint over the network (AV:N), which in default SiYuan deployments is typically bound to localhost or a local network interface. Exploitation is limited by: (1) the requirement for admin or API-token authentication; (2) the target files must exist at predictable paths on the host filesystem; (3) the SiYuan process must have read permission for the target credential files, which depends on the OS user running SiYuan. In containerized deployments where host directories are volume-mounted, the accessible credential file surface may be larger. No special application feature flag or non-default configuration is required beyond having a running SiYuan instance with API access - the vulnerable endpoint is part of the default API surface. |
| Impact | The CVSS 3.1 base score of 4.9 (AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N) accurately characterizes this vulnerability. The PR:H rating is critical context - exploitation is gated on administrative access or a valid API token, which materially limits the attacker pool. However, C:H reflects the real impact: once those credentials are obtained, an attacker can pivot laterally into Kubernetes clusters, Docker registries, PostgreSQL databases, and Git-hosting accounts, effectively using SiYuan as a credential harvesting relay. No EPSS data was provided in the input and this CVE is not in the CISA KEV catalog, meaning no confirmed active exploitation. The 'Docker' tag in the source intelligence is operationally significant: containerized SiYuan deployments with home-directory mounts are especially exposed because cloud-provider credential files (e.g., ~/.aws, ~/.gcloud) may also be reachable, even though not explicitly named in the advisory. The real-world risk is moderate-to-high in privilege-escalation chains but low as a standalone initial access vector, because it requires prior admin-level authentication. |
| Exploit ScenarioDerived | An attacker who has obtained SiYuan administrator credentials or a valid API token - through phishing, credential reuse, or insider access - sends a POST request to /api/file/globalCopyFiles specifying an absolute path such as /root/.kube/config or /home/user/.docker/config.json as the source. The incomplete denylist allows the copy to proceed, placing the credential file inside the SiYuan workspace directory. The attacker then retrieves the file contents via SiYuan's file-serving API, gaining Kubernetes or Docker registry credentials without requiring any direct filesystem access. No public proof-of-concept code has been identified, but the attack requires only knowledge of standard credential file paths. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 09, 2026
Credential file exfiltration in SiYuan prior to 3.7.1 is possible through the POST /api/file/globalCopyFiles endpoint, which accepts arbitrary absolute source paths and relies on an incomplete denylist in util.IsSensitivePath to block sensitive files. The denylist omits common credential files including .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, and .gnupg, enabling an authenticated administrator or API-token holder to copy these files into the workspace and read them via the file API. No public exploit code or CISA KEV listing exists at time of analysis, but the Docker tag suggests this is relevant in containerized deployments where host-mounted credential files may be accessible.
RemediationAI
Upgrade SiYuan to version 3.7.1 (stable) or 3.7.1-alpha.2 (pre-release), both of which contain the fix as confirmed by commits 914c5180a88d17f6d38716a56483327b367ef55f and b54fee401799d987d2fd2888220938ad599b8c5e. The fix is available at https://github.com/siyuan-note/siyuan/releases/tag/v3.7.1. For deployments that cannot immediately upgrade, restrict access to the SiYuan API port to trusted network segments only, as this eliminates the network-accessible attack surface. Do not rely on the existing denylist as a compensating control - the core defect is the denylist's incomplete enumeration, and it cannot be safely extended in-place without patching. In Docker environments, avoid mounting the host home directory or credential directories (e.g., ~/.kube, ~/.docker) into the SiYuan container; instead, use dedicated service accounts with scoped credentials. Revoke and rotate any credentials stored in the affected file types (.kube/config, .docker/config.json, .netrc, .pgpass, .git-credentials, .gnupg) if there is reason to believe the system was accessed by unauthorized API-token holders prior to patching.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SiYuan (CPE: cpe:2.3:a:siyuan-note:siyuan:*:*:*:*:*:*:*:*) is an open-source personal knowledge management system with a local-first architecture backed by a Go kernel. The affected endpoint POST /api/file/globalCopyFiles is a server-side API that processes user-supplied file paths. The protection mechanism in kernel/util/path.go uses a denylist approach (util.IsSensitivePath) to block access to sensitive filesystem paths - a classic CWE-693 (Protection Mechanism Failure) anti-pattern, where reliance on incomplete enumeration rather than allowlisting leads to coverage gaps. The denylist fails to enumerate widely-used home-directory credential stores such as .kube/config (Kubernetes credentials), .docker/config.json (Docker registry tokens), .netrc (FTP/HTTP credentials), .pgpass (PostgreSQL credentials), .git-credentials, and .gnupg (GPG keyrings). Once a file is copied into the workspace, SiYuan's own file-serving API can be used to retrieve its contents, completing a two-step exfiltration path entirely within the application.
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
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Network-accessible API (AV:N) requires admin or API-token authentication (PR:H); credential file exfiltration is C:H with no integrity or availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
SiYuan is an open-source personal knowledge management system. Prior to 3.7.1, POST /api/file/globalCopyFiles accepts attacker-supplied absolute source paths and relies on util.IsSensitivePath in kernel/util/path.go, whose denylist misses common home-directory credential files such as .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, and .gnupg, allowing an authenticated administrator or API-token user to copy those files into the workspace and exfiltrate them through the file API. This issue is fixed in versions 3.7.1-alpha.2 and 3.7.1.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
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
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB