CVE-2026-59854: SiYuan Credential File Exfiltration via Path Traversal—Patch to 3.7.1
SiYuan is a popular open-source personal knowledge management platform. Versions prior to 3.7.1 contain a file-access vulnerability in the global file copy API endpoint that allows authenticated users with administrator privileges or valid API tokens to extract sensitive credential files from the host system. An attacker can exploit a gap in the file-path validation logic to copy commonly-used credential stores—such as Git credentials, SSH keys, database passwords, Kubernetes configuration, and Docker authentication tokens—from the user's home directory into the SiYuan workspace, then download them via the file API. The vulnerability requires valid authentication, limiting exposure to insider threats or compromised service accounts.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.9 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-693
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-09 / 2026-07-10
NVD description (verbatim)
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.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-59854 exploits insufficient path validation in SiYuan's POST /api/file/globalCopyFiles endpoint. The endpoint permits authenticated users to supply arbitrary absolute source paths for file copy operations. The security boundary enforces a denylist via util.IsSensitivePath (kernel/util/path.go), but this list omits well-known credential file locations: .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, and .gnupg directories. An attacker with admin role or valid API token can reference these paths, copy them into the workspace's accessible file tree, and exfiltrate them through standard file retrieval endpoints. The fix in 3.7.1-alpha.2 and 3.7.1 extends the denylist to include these credential stores.
Business impact
Compromise of local credential files can cascade into lateral movement and privilege escalation across infrastructure. Exfiltrated Git credentials enable unauthorized code repository access; Docker and Kubernetes configs grant container registry and cluster manipulation; database password files enable direct data-store compromise. Organizations running SiYuan in environments where multiple users or service accounts have API access face elevated risk. The impact is contained to credential material accessible on the SiYuan host; no remote code execution, denial of service, or integrity compromise is involved.
Affected systems
SiYuan versions prior to 3.7.1 are affected. This includes stable releases and development builds before 3.7.1-alpha.2. Organizations running on versions 3.6.x, 3.5.x, and earlier are at risk. The vulnerability requires valid authentication (admin role or API token), so exposure is limited to trusted personnel, service accounts, or attackers who have obtained valid credentials through other means.
Exploitability
Exploitation is straightforward for authenticated users: craft a POST request to /api/file/globalCopyFiles with the absolute path to a credential file (e.g., /home/username/.ssh/id_rsa) and copy it into a workspace directory. No user interaction is required, and no unusual system state must be triggered. However, exploitation is restricted to users with administrator privileges or valid API tokens. An attacker must either hold a legitimate account with sufficient permissions or have compromised one. No public exploit code is known to be in circulation; this is a privilege-escalation risk rather than an unauthenticated remote-code-execution vulnerability.
Remediation
Upgrade SiYuan to version 3.7.1 or later immediately. The vendor has released 3.7.1-alpha.2 as an intermediate patch and 3.7.1 as the stable release. Both versions correct the path denylist to block access to .git-credentials, .netrc, .pgpass, .kube/config, .docker/config.json, and .gnupg. Organizations unable to upgrade immediately should restrict API token distribution and limit administrator role assignments to essential personnel.
Patch guidance
Download and deploy SiYuan 3.7.1 or 3.7.1-alpha.2 from the official SiYuan repository. Verify the release signature and checksum against the project's published materials. Perform a staged rollout in non-production environments first to confirm compatibility with existing plugins and custom configurations. No database migration or manual intervention is required. After deployment, revoke any API tokens that may have been generated or used during the vulnerability window if you suspect exposure.
Detection guidance
Monitor access logs for POST requests to /api/file/globalCopyFiles with source paths matching credential file patterns (/home/*, /root/.git-credentials, .netrc, .docker/config.json, .kube/config, .gnupg, etc.). Look for filesystem copy operations involving home-directory credential files into the SiYuan workspace directory. If SiYuan generates request or audit logs, search for file operations referencing sensitive paths. Correlate admin or API token activity with file-copy requests during the vulnerability window. Check workspace file trees for unexpected credential files that may have been copied in.
Why prioritize this
Although the CVSS score is MEDIUM (4.9), the practical risk to organizations depends on deployment context. If SiYuan runs in a multi-user environment, near sensitive infrastructure (dev, CI/CD, deployment hosts), or exposes API tokens to third-party integrations, prioritize patching within 7–14 days. The vulnerability is not actively exploited in the wild and requires authentication, so it is less urgent than a zero-day remote-code-execution flaw. However, credential theft is a high-value attack outcome, and the ease of exploitation once authenticated justifies prompt remediation.
Risk score, explained
The CVSS v3.1 score of 4.9 (MEDIUM) reflects high confidentiality impact (credential loss) but requires high privilege (admin/API token) and no network-based unauthenticated access. The attack vector is network-accessible, but the prerequisite of valid authentication significantly reduces real-world risk. Organizations with strict API token and role-based access controls face lower immediate risk; those with permissive token issuance or shared admin accounts face higher practical risk.
Frequently asked questions
Do I need to patch if my SiYuan instance is air-gapped or only used by trusted administrators?
Air-gapped deployments eliminate remote attack routes. However, insider threats (disgruntled employees, compromised admin accounts) remain a concern. If your admin pool is small and well-vetted, risk is lower—but patching is still recommended to close the vector entirely. Trusted environments are not immune to account compromise via phishing or credential reuse.
What if I've rotated all my credentials already?
Rotation reduces the blast radius of any past compromise, but it does not address the vulnerability. An attacker with ongoing access can extract fresh credentials immediately after rotation. Patching closes the vector itself.
Does this affect SiYuan Community Edition and Docker-based deployments?
The vulnerability affects all SiYuan distributions (open-source, community, enterprise) running versions before 3.7.1. Docker-based deployments are equally vulnerable if the version tag is prior to 3.7.1. Update your Docker image tag and redeploy.
Are there workarounds if I cannot patch immediately?
Temporary mitigations include disabling or restricting API token access, enforcing network-level access control to the SiYuan API, and auditing which users hold admin roles. However, these are not substitutes for patching. Plan an upgrade within 14 days.
This analysis is provided for informational purposes and reflects available vendor documentation and CVE metadata as of the publication date. Readers should verify patch availability, compatibility, and deployment procedures against the official SiYuan project repository and release notes. SEC.co does not guarantee the completeness or accuracy of third-party vendor advisories. Organizations should conduct their own risk assessment based on their specific deployment, access controls, and threat model. This document does not constitute security advisory or legal counsel. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-30431MEDIUMmacOS Private Information Disclosure Vulnerability – Patch Guidance
- CVE-2025-48571MEDIUMAndroid Bluetooth SMS Interception Vulnerability (CVSS 4.3)
- CVE-2026-10174MEDIUMAider 0.86.3 Pre-commit Hook Bypass Vulnerability
- CVE-2026-10944MEDIUMChrome iOS Autofill Data Leak Vulnerability – Patch Now
- CVE-2026-10950MEDIUMChrome iOS Autofill Data Leak Vulnerability – Patch Guide
- CVE-2026-11174MEDIUMChrome Site Isolation Bypass – CVSS 5.3 Medium Vulnerability
- CVE-2026-11206MEDIUMChrome Service Worker Data Leak Vulnerability – CVSS 6.5
- CVE-2026-11219MEDIUMGoogle Chrome Navigation Bypass Vulnerability – Patching Guide