Horizon Alert
Summary of the vulnerability and why it matters
A vulnerability in the SiYuan kernel's database cleaning tool could allow an authenticated user to read and delete arbitrary files on the system. This issue arises from insufficient validation of a parameter used to identify database entries, enabling attackers to manipulate file paths.
- Allows file reading and deletion via a tool.
- Affects authenticated users with specific tool access.
- Confirm relevance and exposure to SiYuan instances.
Attack Path
How an attacker could exploit the issue
An attacker with authenticated access to the SiYuan kernel's MCP tool can exploit a path traversal flaw to read and delete arbitrary files. The vulnerability arises because the tool does not properly validate the `id` parameter, allowing an attacker to craft special input that manipulates file paths. This can result in the kernel copying a file readable by the process to the history directory and then deleting the original file.
- Authenticated MCP client needed.
- Path traversal via `id` parameter.
- Arbitrary file read and deletion.
Live Threat
Current exploitation, exposure, and threat context
An authenticated user with access to the database_clean MCP tool could leverage a path traversal vulnerability to read and delete arbitrary files on the system. This could occur when the tool processes an improperly validated `id` parameter, allowing it to construct file paths outside of its intended directory when supported by the advisory.
- System files could be read.
- Malicious input in `id` parameter.
- Arbitrary file read and deletion.
Operational Fix
Recommended remediation, mitigation, and detection steps
The SiYuan kernel's MCP tool is likely managed by the application or platform team responsible for its integration and maintenance. The first practical step is to identify all instances of the SiYuan kernel, confirm if the MCP tool is exposed externally or to untrusted inputs, and then determine the business criticality of affected instances to prioritize remediation efforts.
- Application or platform team ownership.
- Verify MCP tool exposure and reachability.
- Plan remediation based on confirmed risk.