Description
SiYuan is an open-source personal knowledge management system. Prior to 3.7.1, the /snippets/*filepath route handler serveSnippets in kernel/server/serve.go joins a single-decoded request path with the snippets directory without subpath containment or sensitive-path checks, allowing an authenticated request such as /snippets/%2e%2e/%2e%2e/conf/conf.json to read workspace secrets and the document database. This issue is fixed in versions 3.7.1.
Problem types
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CWE-23: Relative Path Traversal
Product status
References
github.com/...siyuan/security/advisories/GHSA-275h-v5h9-vr82
github.com/...ommit/68cc0f537dfa4502496dfa794e71835421c25c09
github.com/siyuan-note/siyuan/releases/tag/v3.7.1