SiYuan Personal Knowledge Management System Incomplete Denylist Vulnerability in IsSensitivePath Function Allows Unauthorized File Access

Vulnerability

A vulnerability exists in SiYuan personal knowledge management system versions prior to 3.6.2, where the IsSensitivePath() function employs an incomplete denylist approach. This flaw allows unauthorized access to multiple security-sensitive Linux directories, including /opt, /usr, /home, /mnt, /media, and /snap. The globalCopyFiles and importStdMd endpoints depend on IsSensitivePath for path validation, creating a risk of reading files outside the designated workspace.

Impact

Exploitation of this vulnerability allows for arbitrary file reading from several sensitive directories, including /opt, /usr, /home, /mnt, /media, and /snap. In Docker deployments, this could involve accessing application source code, configuration files, and mounted secrets. The fundamental flaw in the denylist approach means that any newly introduced filesystem path remains accessible until explicitly blocked.

Reproduction

The vulnerability can be reproduced by using the globalCopyFiles endpoint, which is available in the SiYuan API. This endpoint does not properly validate paths against the incomplete denylist, allowing files from the sensitive directories to be copied into the user's workspace. After the files are copied, they can be accessed through the getFile endpoint.

Remediation

Users can update to SiYuan version 3.6.2, which includes a complete fix for this vulnerability.

Added: Mar 20, 2026, 11:29 PM
Updated: Mar 20, 2026, 11:29 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
0.2
exploitability
5.8
remediation
7.7
relevance
4.4
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.