CVE-2026-82651
SiYuan before v3.8.1 Missing Authorization via /history and /repo/diff
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.9
SiYuan before v3.8.1 Missing Authorization via /history and /repo/diff
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
- Record
CVE-2026-82651- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
EUVDEUVD-2026-68237
6.9
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
- Record
EUVD-2026-68237- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-3cm4-ccvw-6xr6
4.9
SiYuan: /history/*path and /repo/diff/*path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/*
Summary
GHSA-c8r8-95hg-mp34 added a centralized guard,
util.IsForbiddenAbsPath(), specifically to block access to a small
set of sensitive files: conf/conf.json (plaintext
accessAuthCode/API token/cookie key), data/snippets/conf.json,
the entire data/templates/ directory, and
data/.siyuan/publishAccess.json (plaintext publish-mode passwords).
It was applied to kernel/api/file.go and kernel/mcp/tools/file.go.
Two other routes in the same server that serve arbitrary files by path,
/history/*path and /repo/diff/*path, construct their target paths
independently and were not updated to call this new guard. Since the
repo/history snapshot system's tracked root is data/ (confirmed by
getSyncIgnoreLines(), whose ignore file lives at
data/.siyuan/syncignore with entries relative to data/), both
data/.siyuan/publishAccess.json and data/templates/* fall within
the scope that can legitimately be captured in historical snapshots,
meaning a prior version of either file can exist in
util.HistoryDir/the repo-diff temp checkout even after the live file
has been protected by the new guard. This is CWE-862 (Missing
Authorization) applied to a very recently introduced protection
mechanism.
Details
kernel/server/serve.go, /history/*path (around line 994):
ginServer.GET("/history/*path", model.CheckAuth, model.CheckAdminRole, func(context *gin.Context) {
p := filepath.Join(util.HistoryDir, context.Param("path"))
// 加密笔记本的历史是密文(.sy/assets/AV),需先解密再输出
if serveEncryptedHistory(context, p) {
return
}
secureAssetContentHeaders(context, p, p)
http.ServeFile(context.Writer, context.Request, p)
})
No call to util.IsForbiddenAbsPath(p) anywhere in this handler.
kernel/server/serve.go, /repo/diff/*path (around line 1241):
ginServer.GET("/repo/diff/*path", model.CheckAuth, model.CheckAdminRole, func(context *gin.Context) {
requestPath := filepath.Clean(context.Param("path"))
if strings.Contains(requestPath, "..") {
context.Status(http.StatusUnauthorized)
return
}
...
p := filepath.Join(repoDiffBaseDir, requestPath)
if !gulu.File.IsSubPath(repoDiffBaseDir, p) {
context.Status(http.StatusUnauthorized)
return
}
http.ServeFile(context.Writer, context.Request, p)
})
This route does have its own traversal protection (.. rejection and
IsSubPath containment within repoDiffBaseDir), but that only
prevents escaping the diff-checkout directory, it does nothing to
prevent retrieving a legitimately checked-out historical copy of
publishAccess.json or a templates file from within that directory,
which is exactly what the new guard exists to prevent regardless of
which directory the copy currently sits in.
util.IsForbiddenAbsPath() itself (kernel/util/path_guard.go,
introduced by the referenced fix) confirms the intended scope:
// 禁止访问 data/.siyuan/publishAccess.json(含发布模式明文访问密码)
publishAccessPath := NormalizeAndResolve(filepath.Join(DataDir, ".siyuan", "publishAccess.json"))
if fileNorm == publishAccessPath {
return true
}
and
// 禁止访问 data/templates 目录(含目录本身及其全部子路径)
templatesBase := NormalizeAndResolve(filepath.Join(DataDir, "templates"))
if fileNorm == templatesBase || gulu.File.IsSubPath(templatesBase, fileNorm) {
return true
}
Both are paths within data/, the same root the sync/history/repo
system tracks.
Step-by-step reproduction
- As the workspace admin, enable Publish with a password on at least
one notebook (creating
data/.siyuan/publishAccess.jsonwith a plaintext password), then let a sync/backup snapshot capture this state (or check whether local history capture already coversdata/.siyuan/in the deployed version). - Change or remove the publish password, so the live
publishAccess.jsonno longer contains…
- Record
GHSA-3cm4-ccvw-6xr6- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200, CWE-862
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j8f5-rf5j-w7pm
6.9
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg...
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
- Record
GHSA-j8f5-rf5j-w7pm- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
NVD
6.9
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
- Record
CVE-2026-82651- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
OSV
6.9
SiYuan before v3.8.1 Missing Authorization via /history and /repo/diff
SiYuan before v3.8.1 does not apply the IsForbiddenAbsPath guard (introduced in GHSA-c8r8-95hg-mp34) to the /history/*path and /repo/diff/*path endpoints in kernel/server/serve.go. These routes require admin authentication but construct file paths independently, so an authenticated administrator can retrieve historical snapshots of sensitive files that the guard is meant to block, including data/.siyuan/publishAccess.json (plaintext publish-mode passwords) and files under data/templates/.
- Record
CVE-2026-82651- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-200
- Updated
- 2026-11-02
OSVGHSA-3cm4-ccvw-6xr6
4.9
SiYuan: /history/*path and /repo/diff/*path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/*
Summary
GHSA-c8r8-95hg-mp34 added a centralized guard,
util.IsForbiddenAbsPath(), specifically to block access to a small
set of sensitive files: conf/conf.json (plaintext
accessAuthCode/API token/cookie key), data/snippets/conf.json,
the entire data/templates/ directory, and
data/.siyuan/publishAccess.json (plaintext publish-mode passwords).
It was applied to kernel/api/file.go and kernel/mcp/tools/file.go.
Two other routes in the same server that serve arbitrary files by path,
/history/*path and /repo/diff/*path, construct their target paths
independently and were not updated to call this new guard. Since the
repo/history snapshot system's tracked root is data/ (confirmed by
getSyncIgnoreLines(), whose ignore file lives at
data/.siyuan/syncignore with entries relative to data/), both
data/.siyuan/publishAccess.json and data/templates/* fall within
the scope that can legitimately be captured in historical snapshots,
meaning a prior version of either file can exist in
util.HistoryDir/the repo-diff temp checkout even after the live file
has been protected by the new guard. This is CWE-862 (Missing
Authorization) applied to a very recently introduced protection
mechanism.
Details
kernel/server/serve.go, /history/*path (around line 994):
ginServer.GET("/history/*path", model.CheckAuth, model.CheckAdminRole, func(context *gin.Context) {
p := filepath.Join(util.HistoryDir, context.Param("path"))
// 加密笔记本的历史是密文(.sy/assets/AV),需先解密再输出
if serveEncryptedHistory(context, p) {
return
}
secureAssetContentHeaders(context, p, p)
http.ServeFile(context.Writer, context.Request, p)
})
No call to util.IsForbiddenAbsPath(p) anywhere in this handler.
kernel/server/serve.go, /repo/diff/*path (around line 1241):
ginServer.GET("/repo/diff/*path", model.CheckAuth, model.CheckAdminRole, func(context *gin.Context) {
requestPath := filepath.Clean(context.Param("path"))
if strings.Contains(requestPath, "..") {
context.Status(http.StatusUnauthorized)
return
}
...
p := filepath.Join(repoDiffBaseDir, requestPath)
if !gulu.File.IsSubPath(repoDiffBaseDir, p) {
context.Status(http.StatusUnauthorized)
return
}
http.ServeFile(context.Writer, context.Request, p)
})
This route does have its own traversal protection (.. rejection and
IsSubPath containment within repoDiffBaseDir), but that only
prevents escaping the diff-checkout directory, it does nothing to
prevent retrieving a legitimately checked-out historical copy of
publishAccess.json or a templates file from within that directory,
which is exactly what the new guard exists to prevent regardless of
which directory the copy currently sits in.
util.IsForbiddenAbsPath() itself (kernel/util/path_guard.go,
introduced by the referenced fix) confirms the intended scope:
// 禁止访问 data/.siyuan/publishAccess.json(含发布模式明文访问密码)
publishAccessPath := NormalizeAndResolve(filepath.Join(DataDir, ".siyuan", "publishAccess.json"))
if fileNorm == publishAccessPath {
return true
}
and
// 禁止访问 data/templates 目录(含目录本身及其全部子路径)
templatesBase := NormalizeAndResolve(filepath.Join(DataDir, "templates"))
if fileNorm == templatesBase || gulu.File.IsSubPath(templatesBase, fileNorm) {
return true
}
Both are paths within data/, the same root the sync/history/repo
system tracks.
Step-by-step reproduction
- As the workspace admin, enable Publish with a password on at least
one notebook (creating
data/.siyuan/publishAccess.jsonwith a plaintext password), then let a sync/backup snapshot capture this state (or check whether local history capture already coversdata/.siyuan/in the deployed version). - Change or remove the publish password, so the live
publishAccess.jsonno longer contains…
- Record
GHSA-3cm4-ccvw-6xr6- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200, CWE-862
- Updated
- 2026-11-02
OSVGO-2026-6662 No score
SiYuan: /history/*path and /repo/diff/*path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/* in github.com/siyuan-note/siyuan/kernel
SiYuan: /history/*path and /repo/diff/path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/ in github.com/siyuan-note/siyuan/kernel
- Record
GO-2026-6662- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/siyuan-note/siyuan/kernelGo |
before 0.0.0-20260816034002-035bf9a8c311 | 0.0.0-20260816034002-035bf9a8c311 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-82651 is a medium vulnerability (CVSS 6.9) in Siyuan-note Siyuan, published August 30, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.48%, the 41st percentile. Fixed in github.com/siyuan-note/siyuan/kernel 0.0.0-20260816034002-035bf9a8c311.
References
github.com/siyuan-note/siyuan/security/advisories/GHSA-3cm4-ccvw-6xr6
vulncheck.com/advisories/siyuan-before-3.8.1-missing-authorization-via-history-and-repo-diff
github.com/siyuan-note/siyuan/commit/035bf9a8c311c6f8468f2f1054b4d5e1711787e2
github.com/siyuan-note/siyuan/releases/tag/v3.8.1
github.com/advisories/GHSA-3cm4-ccvw-6xr6
nvd.nist.gov/vuln/detail/CVE-2026-82651
github.com/advisories/GHSA-j8f5-rf5j-w7pm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/82xxx/CVE-2026-82651.json
github.com/siyuan-note/siyuan
Left out here: the rest of 2 source descriptions. The JSON record has them.