{"id":"CVE-2026-72805","aliases":["CVE-2026-72805","GHSA-67x2-mq63-v9vm","GO-2026-6387"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan before v3.7.4 Information Disclosure via Block Endpoints","summary":"SiYuan versions before v3.7.4 fail to enforce publish-access checks on getBlockBreadcrumb, getRefText, and getBlockTreeInfos endpoints, allowing disclosure of protected document content and metadata. Anonymous readers or publish RoleReader accounts can retrieve document titles, ancestor block content snippets, reference text, and path metadata for publish-forbidden or password-protected documents by supplying block IDs.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SiYuan versions before v3.7.4 fail to enforce publish-access checks on getBlockBreadcrumb, getRefText, and getBlockTreeInfos endpoints, allowing disclosure of protected document content and metadata. Anonymous readers or publish RoleReader accounts can retrieve document titles, ancestor block content snippets, reference text, and path metadata for publish-forbidden or password-protected documents by supplying block IDs.","source":"cvelist"},{"lang":"en","text":"**CVE:** This vulnerability corresponds to [CVE-2026-72805](https://nvd.nist.gov/vuln/detail/CVE-2026-72805).\n\n### Summary\n\nThree block endpoints return document content snippets and metadata without any publish-access check, while their sibling `getBlockInfo` which returns comparable data does enforce one. All three are `CheckAuth`-only, so they are reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`. An anonymous reader supplying a block ID receives content and metadata belonging to publish-forbidden and password-protected documents.\n\n### Details\n\n`getBlockInfo` (`kernel/api/block.go`) gates on the publish boundary:\n```go\nif !checkBlockPublishAccess(c, id, ret) {\n    return\n}\n```\n\nThe following siblings in the same file perform no equivalent check:\n\n| Endpoint | Returns | Publish check |\n|---|---|---|\n| `getBlockInfo` | root/title/path metadata | `checkBlockPublishAccess`: present |\n| `getBlockBreadcrumb` | `BlockPath.Name` : root document title plus every ancestor block's content snippet | none |\n| `getRefText` | the block's reference/anchor text (document content) | none |\n| `getBlockTreeInfos` | root/title/path metadata for arbitrary block IDs | none |\n\n`getBlockBreadcrumb` returns the full ancestor chain including each ancestor block's content snippet, and `getRefText` returns block anchor text both are document content, not just metadata. `getBlockTreeInfos` returns root/title/path for any caller-supplied ID set via `model.GetBlockTreeInfosInBox(...)` with no gate.\n\n`getBlockBreadcrumb` and `getRefText` additionally accept a client-supplied notebook argument that routes to the `*InBox` variants, so the same unguarded path applies to encrypted-notebook reads while the notebook is unlocked.\n\nThe correct primitive already exists in the codebase and is used by `getBlockInfo`; these three handlers simply do not call it.\n\n### Proof of Concept\n\nPrecondition: publish mode enabled (default port 6808); anonymous when `Publish.Auth.Enable` is `false`, otherwise any publish reader account. A document `D` is marked publish-forbidden (or password-protected) and contains a block `BLOCK_ID` under a heading with distinctive content.\n\n**Control: the gated sibling correctly refuses:**\n```\nPOST http://127.0.0.1:6808/api/block/getBlockInfo\n{\"id\":\"BLOCK_ID\"}\n```\nBlocked by `checkBlockPublishAccess`.\n\n**Disclosure: the ungated siblings return the data anyway:**\n```\nPOST http://127.0.0.1:6808/api/block/getBlockBreadcrumb\n{\"id\":\"BLOCK_ID\"}\n→ ancestor chain including the forbidden document's title and ancestor block content snippets\n\nPOST http://127.0.0.1:6808/api/block/getRefText\n{\"id\":\"BLOCK_ID\"}\n→ the block's reference/anchor text (content of the forbidden document)\n\nPOST http://127.0.0.1:6808/api/block/getBlockTreeInfos\n{\"ids\":[\"BLOCK_ID\"]}\n→ root ID, title, and path for the forbidden document\n```\n\nVerified by code inspection at `origin/master` (`eef10568`): `getBlockInfo` contains the `checkBlockPublishAccess` call; `getBlockBreadcrumb`, `getRefText`, and `getBlockTreeInfos` contain no publish-access, publish-ignore, or readonly-role check in their bodies.\n\n### Impact\n\nAn anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read, for documents explicitly excluded from publishing or protected by a publish password:\n- the document title and full ancestor chain, including ancestor block content snippets (`getBlockBreadcrumb`);\n- block reference/anchor text, i.e. document content (`getRefText`);\n- root ID, title, and path metadata for arbitrary block IDs (`getBlockTreeInfos`).\n\nBecause `getBlockBreadcrumb` and `getRefText` accept a notebook argument routing to the `*InBox` variants, the same disclosure applies to encrypted notebooks while unlocked. Confidentiality-only; the precondition is a block ID, obtainable from other reader-reachable endpoints.\n\n### Suggested fix\n\nCall `checkBlockPublishAccess` (as `getBlockInfo` does) in `getBlockBreadcrumb`, `getRefText`, and `getBlockTreeInfos` before returning data for `getBlockTreeInfos`, apply it per ID and drop unauthorized entries. Confirm the `*InBox` variants (`GetBlockRefTextInBox`, `BuildBlockBreadcrumbInBox`) enforce the same boundary so the notebook-argument path is covered.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan: Missing publish-access check on getBlockBreadcrumb, getRefText, and getBlockTreeInfos discloses content and metadata of protected/forbidden documents in github.com/siyuan-note/siyuan/kernel","format":"markdown","source":"go"},{"lang":"es","text":"Las versiones de SiYuan anteriores a la v3.7.4 no aplican los controles de acceso de publicación en los puntos finales getBlockBreadcrumb, getRefText y getBlockTreeInfos, lo que permite la divulgación de contenido y metadatos de documentos protegidos. Lectores anónimos o cuentas con el rol de Lector de publicación pueden recuperar títulos de documentos, fragmentos de contenido de bloques ancestros, texto de referencia y metadatos de ruta para documentos con publicación prohibida o protegidos con contraseña al proporcionar IDs de bloque.","source":"nvd"}],"published":"2026-08-12T19:07:49.909Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-862"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.7.4","status":"affected"},{"type":"semver","version":"3.7.4","status":"unaffected"}],"vendor":"siyuan-note","product":"siyuan","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260723163028-931ba693375e"}],"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","fixed":"0.0.0-20260723163028-931ba693375e"}],"ecosystem":"Go","package":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","source":"go"}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-67x2-mq63-v9vm","tags":["advisory","exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://www.vulncheck.com/advisories/siyuan-before-information-disclosure-via-block-endpoints","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72805","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan/commit/931ba693375ea9877b2ef74f9bfb632fad5bab3f","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan","tags":["package"],"sources":["ghsa"]}],"credits":["Shirshakhtml"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-08-14T22:04:45.816Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-72805","url":"https://www.cve.org/CVERecord?id=CVE-2026-72805","licence":"CVE Terms of Use","modified":"2026-08-14T22:05:17.775Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-67x2-mq63-v9vm","url":"https://github.com/advisories/GHSA-67x2-mq63-v9vm","licence":"CC-BY-4.0","modified":"2026-09-10T15:25:36.389Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6387","url":"https://pkg.go.dev/vuln/GO-2026-6387","licence":"CC-BY-4.0","modified":"2026-09-10T15:15:14.109Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-72805","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72805","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.637Z","epss":{"score":0.00296,"percentile":0.23964,"date":"2026-12-01T12:00:22.000Z"}}