CVE-2026-25539

SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE

Published Feb 4, 2026 CVSS 3.1 · 9.1 Critical EPSS 1.2% KEV · Not listed
Description
SiYuan is a personal knowledge management system. Prior to version 3.5.5, the /api/file/copyFile endpoint does not validate the dest parameter, allowing authenticated users to write files to arbitrary locations on the filesystem. This can lead to Remote Code Execution (RCE) by writing to sensitive locations such as cron jobs, SSH authorized_keys, or shell configuration files. This issue has been patched in version 3.5.5.

Analysis

AI-generated

Technical impact

An authenticated user can invoke the /api/file/copyFile endpoint to write a file to an arbitrary location on the host because the destination path is not validated. This missing path‑validation allows overwriting critical system files such as cron jobs, SSH authorized_keys, or shell configuration files, which can be exploited to execute arbitrary code on the device. The weakness corresponds to Path Traversal (CWE‑22).

Affected Systems

SiYuan, a personal knowledge management system, is affected for all releases prior to version 3.5.5. Any deployment that has authentication enabled and has not upgraded to the patched release remains vulnerable.

Risk and Exploitability

The CVSS base score is 9.1, indicating a high severity vulnerability, but the EPSS score is below 1 %, signifying a very low projected exploitation probability at the present time. The vulnerability is not listed in the CISA KEV catalog. An attacker requires valid authentication and access to the API; once the arbitrary write is achieved, the attacker can place malicious binaries or scripts in system directories where execution is triggered, enabling remote code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SiYuan to version 3.5.5 or later to apply the official fix.
  • Disable or restrict access to the /api/file/copyFile endpoint for all users until an upgrade can be performed, or configure the application to limit the destination directory to a safe, non‑critical area.
  • Ensure file system permissions deny ordinary users write access to critical system directories such as /etc/cron.d, /etc/ssh/authorized_keys, and shell configuration files.
  • Use file‑system monitoring to detect unexpected writes to protected directories and generate alerts for suspicious activity.

Generated by OpenCVE AI on April 17, 2026 at 23:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-c4jr-5q7w-f6r9 SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE
History
Type Values Removed Values Added
First Time appeared B3log
B3log siyuan
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan
Type Values Removed Values Added
Description SiYuan is a personal knowledge management system. Prior to version 3.5.5, the /api/file/copyFile endpoint does not validate the dest parameter, allowing authenticated users to write files to arbitrary locations on the filesystem. This can lead to Remote Code Execution (RCE) by writing to sensitive locations such as cron jobs, SSH authorized_keys, or shell configuration files. This issue has been patched in version 3.5.5.
Title SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 5, 2026, 6:32 PM
Reserved
Feb 2, 2026, 7:59 PM
Status
Analyzed
Published
Feb 4, 2026, 10:16 PM
Modified
Jun 17, 2026, 10:24 AM