GHSA-hq2c-hh95-vrr6: SiYuan 3.7.0 before 3.8.10 Path Traversal File Write via MCP web_fetch
SiYuan 3.7.0 before 3.8.10 on Windows contains a path traversal vulnerability in kernel/util/webfetch.go that allows attackers to write files outside the import directory via backslash-encoded filenames. Attackers controlling a URL fetched by the MCP webfetch or httprequest tools can use %5C-encoded ..\ sequences to write chosen response bytes to directories above temp/import that are writable by the SiYuan user.
Event History
Frequently Asked Questions
Which deployments are exposed?
The issue affects SiYuan versions from 3.7.0 before 3.8.10 on Windows. Exploitation requires use of the MCP web_fetch or http_request tools against an attacker-controlled URL.
What does an attacker need to exploit this?
An attacker must be able to control the content served by a URL that SiYuan fetches through MCP web_fetch or http_request. User interaction is required, as indicated by the advisory’s UI:P vector.
What is the practical impact?
The attacker can use backslash-encoded traversal sequences in a filename to write chosen response bytes outside the temporary import directory. Writes are limited to directories above temp/import that are writable by the SiYuan user.
What should be done if an update cannot be applied immediately?
Avoid fetching attacker-controlled or untrusted URLs with the MCP web_fetch and http_request tools. Restrict use of those tools to trusted URLs until updating to 3.8.10 or later.