GHSA-hgfg-j9pg-43xw CVE-2026-72788 GO-2026-6622
SiYuan discloses an administrator's open documents and search terms to anonymous readers
- Severity
- 6.9 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.38%
- Chance of exploitation in the next 30 days. Higher than 31.62% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-863 Incorrect Authorization
- Fix
0.0.0-20260812083335-251596fc0de2- Upgrade github.com/siyuan-note/siyuan/kernel to this version or later
Description
Summary
/api/system/getConf serves Conf.UILayout to publish readers after passing it through FilterConfByPublishIgnore, whose only function is to filter that layout. The layout is written exclusively by setUILayout, which is administrator-gated, so what readers receive is the administrator's own live workspace state, re-saved on every tab open, close and focus change.
The filter that is supposed to protect it, filterLayoutItemByPublishIgnore, has four separate defects. Together they mean a single unauthenticated POST with no arguments returns the titles and identifiers of the administrator's open password-protected documents, the titles of documents in locked or closed notebooks, their recent search terms and the paths those searches were scoped to, and the paths of private assets they have open.
This report concerns FilterConfByPublishIgnore and its layout walker. It is distinct from the previously reported getConf issues, which concern configuration fields surviving HideConfSecret's blocklist. Restructuring the secret-masking path would not affect this, because UILayout is not a secret to be stripped. It is a field intended to be served and filtered.
Details
Route and writer asymmetry. kernel/api/router.go:70 registers POST /api/system/getConf with model.CheckAuth only, so it is reachable by the publish RoleReader token and anonymously when Publish.Auth.Enable is false. The corresponding writer, setUILayout at kernel/api/router.go:67, carries CheckAuth, CheckAdminRole and CheckReadonly. Only an administrator can write this state, and any reader can read it.
The filter exists and is intended to work. HideConfSecret never touches UILayout (zero matches on both refs). Instead the reader branch runs:
if model.IsReadOnlyRoleContext(c) {
publishIgnore := model.GetInvisiblePublishAccess(publishAccess)
maskedConf = model.FilterConfByPublishIgnore(publishIgnore, maskedConf)
}
FilterConfByPublishIgnore does exactly one thing, which is filter UILayout. The intent that readers must not see the administrator's private tabs is therefore already established in the code. The four defects below are failures of that filter, not an argument that it should exist.
filterLayoutItemByPublishIgnore is byte-identical at eef105683 and v3.7.4-alpha.1 and has not changed since 3facc37df (#16041).
Defect 1: the password tier is not checked. GetPathPasswordByPublishAccess and CheckPublishAuthCookie appear zero times in the walker. Of the five access levels defined in publishAccess.ts, only the protected level is {visible: true, password: ...}. A password-protected document therefore never matches the invisible list, and there is no password check to catch it afterwards. Its tab survives intact, carrying title (the document title), docIcon, notebookId, rootId and blockId.
To be precise about scope: the forbidden level sets visible: false, so forbidden documents are correctly filtered. The leak is specific to the password tier.
This is the same class of defect as the recently fixed tag-label filter, on a different function that the tag fix does not touch.
Defect 2: fail-open on an unresolvable document. The walker does:
bt := treenode.GetBlockTree(rootId)
if bt == nil {
return
}
and the tab is retained. Compare CheckBlockIdAccessableByPublishAccess, which fails closed on the same condition. A rootId is unresolvable when its notebook is a locked encrypted notebook or a closed notebook, which are precisely the notebooks a reader must not learn about. Their tab titles pass through.
This survives the recent change that appends encrypted boxes to the invisible and disable ignore lists, because that change only takes effect once bt resolves. The nil branch returns before any ignore list is consulted.
Defect 3: non-editor tabs are never inspected. The walker examines one key, children["rootId"]. Editor tabs and Backlink/Graph tabs carry it. Other tab types do not, and pass through entirely unexamined:
Asset{path, page}discloses the path of a private PDF or other asset the administrator has open.Outline{blockId}discloses a block identifier.Search{config}disclosesk(the search text),r(replace text),name,hPath(a human-readable list of paths) andidPath(the notebook and document identifiers the search was scoped to).Custom{customModelData}discloses arbitrary plugin state.
The Search case is the sharpest, because it discloses what the administrator was looking for and where, in their own words. Search text frequently contains the exact terms a private document is about.
Defect 4: the docks are not filtered. IUiLayout is {layout, left, right, bottom, hideDock} and the walker enters only ["layout"]. Dock entries carry type, size and localized titles, so this is low value on its own, noted for completeness rather than as part of the impact claim.
Proof of Concept
Precondition: publish mode enabled (default port 6808), anonymous when Publish.Auth.Enable is false, otherwise any publish reader account. An administrator with the desktop client open, having at some point opened a password-protected document, a document in a locked or closed notebook, an asset, and run a search.
POST http://127.0.0.1:6808/api/system/getConf
{}
→ 200. conf.uiLayout.layout contains, for the administrator's session:
- Editor tabs for password-protected documents, with title, docIcon,
notebookId, rootId and blockId intact
- Editor tabs whose rootId does not resolve, retained with their titles,
corresponding to locked encrypted or closed notebooks
- Asset tabs carrying private asset paths
- Search tabs carrying the search text, replace text, hPath and idPath
No arguments and no authentication are required. Repeating the request after the administrator opens or closes a tab returns updated state, since setUILayout persists on every such event.
Impact
An anonymous reader in publish mode, or any publish RoleReader, receives a live view of the administrator's working session. The disclosed material includes the titles and identifiers of documents the administrator protected with a publish password, the titles of documents in notebooks that are locked or closed and therefore should not be known to exist, the administrator's search terms together with the human-readable paths those searches covered, and the filesystem paths of private assets.
Titles and search terms are author-written free text and routinely describe the subject matter of the documents they refer to. Because the layout is re-persisted on every tab event, repeated polling yields a running record of what the administrator is working on. Confidentiality only, with no integrity or availability impact.
Suggested fix
Four changes, corresponding to the four defects:
- Replace the invisible-only check with
checkBlockTreeAccessableByPublishAccess, so the password tier is honoured. - Make the
bt == nilbranch fail closed, matchingCheckBlockIdAccessableByPublishAccess. - Drop or scrub
Asset,Outline,SearchandCustominstances rather than passing through anything without arootId. - Walk
left,rightandbottomin addition tolayout.
The simpler and more robust option is to stop serving the administrator's layout to readers at all, and return a minimal default layout instead. Readers have no legitimate use for the administrator's tab arrangement, and a filter that must correctly classify every present and future tab type is a standing source of this class of defect. Defect 3 in particular will recur every time a new tab type is added.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/siyuan-note/siyuan/kernel | < 0.0.0-20260812083335-251596fc0de2 |
0.0.0-20260812083335-251596fc0de2 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/siyuan-note/siyuan/kernel Go → 0.0.0-20260812083335-251596fc0de2
- go
go get github.com/siyuan-note/siyuan/kernel@v0.0.0-20260812083335-251596fc0de2 && go mod tidy
Severity breakdown
CVSS 4.0 6.9
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/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
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- Low
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- Low
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Not defined
- Scope
- X
CVSS 3.1 5.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Weakness
CWE-863: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-xp3q-r38w-vgqm SiYuan: The publish filter for local storage returns the administrator's entire storage map with only three keys sanitized | Medium | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-9cqf-hhrq-7v45 SiYuan: getAttributeViewSearchTarget returns database row content to anonymous readers with no publish-access check, reopening the class closed one day earlier at the adjacent route | High | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-57v5-wqx3-cgj4 SiYuan: Database view structure (all view names, layout types and per-field visibility) is returned to anonymous readers by /api/av/getAttributeViewFieldViews | Medium | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-4wwp-f6gw-6qm5 SiYuan: TLS Private Keys Readable via getFile (Incomplete Blocklist) | High | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-3cm4-ccvw-6xr6 SiYuan: /history/*path and /repo/diff/*path potentially exposing historical snapshots of data/.siyuan/publishAccess.json and data/templates/* | Medium | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-x8gv-g2g3-65fj SiYuan Agent Tools SSRF via DNS-Rebinding TOCTOU (Bypass of CheckHostSSRF) | High | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-p23f-cm6q-2qp8 SiYuan MCP asset.upload Reads Arbitrary Absolute File Paths (Workspace Boundary Bypass) | Medium | Also affects github.com/siyuan-note/siyuan/kernel |
| GHSA-rpx2-p6hp-x5gj SiYuan: Missing consistency check between packageName and repoURL/repoHash in bazaar package install allows overwriting an existing, trusted plugin | Medium | Also affects github.com/siyuan-note/siyuan/kernel |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor