SiYuan has an Unauthenticated Arbitrary File Read via Path Traversal
Description
SiYuan is a personal knowledge management system. Prior to version 3.6.2, the Siyuan kernel exposes an unauthenticated file-serving endpoint under /appearance/*filepath. Due to improper path sanitization, attackers can perform directory traversal and read arbitrary files accessible to the server process. Authentication checks explicitly exclude this endpoint, allowing exploitation without valid credentials. Version 3.6.2 fixes this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/siyuan-note/siyuan/kernelGo | <= 0.0.0-20260317012524-fe4523fff2c8 | — |
Affected products
1- Range: < 3.6.2
Patches
1009bb598b3be:lock: https://github.com/siyuan-note/siyuan/security/advisories/GHSA-hhgj-gg9h-rjp7
1 file changed · +5 −0
kernel/server/serve.go+5 −0 modified@@ -444,6 +444,11 @@ func serveAppearance(ginServer *gin.Engine) { } siyuan.GET("/appearance/*filepath", func(c *gin.Context) { filePath := filepath.Join(appearancePath, strings.TrimPrefix(c.Request.URL.Path, "/appearance/")) + if !util.IsSubPath(appearancePath, filePath) { + c.Status(http.StatusUnauthorized) + return + } + if strings.HasSuffix(c.Request.URL.Path, "/theme.js") { if !gulu.File.IsExist(filePath) { // 主题 js 不存在时生成空内容返回
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-hhgj-gg9h-rjp7ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-33476ghsaADVISORY
- github.com/siyuan-note/siyuan/commit/009bb598b3beccc972aa5f1ed88b3b224326bf2aghsax_refsource_MISCWEB
- github.com/siyuan-note/siyuan/security/advisories/GHSA-hhgj-gg9h-rjp7ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.