CVE-2026-25539
Path Traversal in SiYuan File API Enables Remote Code Execution
Publication date: 2026-02-04
Last updated on: 2026-02-11
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| b3log | siyuan | to 3.5.3 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability exists in SiYuan, a personal knowledge management system, specifically in versions prior to 3.5.5. The /api/file/copyFile endpoint does not properly validate the 'dest' parameter, which allows authenticated users to write files to arbitrary locations on the filesystem.
Because of this lack of validation, an attacker can write files to sensitive locations such as cron jobs, SSH authorized_keys, or shell configuration files, potentially leading to Remote Code Execution (RCE).
This vulnerability was fixed in version 3.5.5.
How can this vulnerability impact me? :
This vulnerability can have severe impacts because it allows an authenticated user to execute arbitrary code remotely by writing files to sensitive system locations.
- Remote Code Execution (RCE) can lead to full system compromise.
- Attackers can modify cron jobs to execute malicious tasks automatically.
- Attackers can add SSH authorized keys to gain persistent access.
- Modifying shell configuration files can allow attackers to maintain control or escalate privileges.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
The immediate step to mitigate this vulnerability is to upgrade SiYuan to version 3.5.5 or later, where the issue has been patched.
Since the vulnerability allows authenticated users to write files to arbitrary locations, restricting access to the /api/file/copyFile endpoint and limiting user privileges can also help reduce risk until the patch is applied.