CVE-2026-126776: 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 through versions before 3.8.10 on Windows. It applies when the MCP web_fetch or http_request tools fetch a URL controlled by an attacker.
What does an attacker need to exploit this?
An attacker needs control over content served from a URL that SiYuan fetches through the affected MCP tools. They can use backslash-encoded traversal sequences in filenames to cause chosen response bytes to be written outside the temp/import directory, subject to the write permissions of the SiYuan user.
What can be done if upgrading is not immediately possible?
Avoid using MCP web_fetch and http_request against attacker-controlled or untrusted URLs. Restrict those tools to trusted sources and run SiYuan under an account with minimal filesystem write permissions.
How can I determine whether a system may have been affected?
Review use of MCP web_fetch and http_request on Windows for requests to untrusted URLs, especially where fetched filenames may contain %5C-encoded ..\ sequences. Check writable directories above temp/import that are accessible to the SiYuan user for unexpected files containing fetched response content.