{"id":"CVE-2026-72804","aliases":["CVE-2026-72804","GHSA-vpjw-wf5h-cgpq","GO-2026-6407"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan before v3.7.4 Authentication Bypass via Graph Endpoints","summary":"SiYuan versions before v3.7.4 fail to validate publish-password tier in getGraph and getLocalGraph endpoints, allowing anonymous readers to retrieve block-level content of password-protected documents. Attackers can call these endpoints without supplying a password to read protected document content and the complete reference topology.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SiYuan versions before v3.7.4 fail to validate publish-password tier in getGraph and getLocalGraph endpoints, allowing anonymous readers to retrieve block-level content of password-protected documents. Attackers can call these endpoints without supplying a password to read protected document content and the complete reference topology.","source":"cvelist"},{"lang":"en","text":"**CVE:** This vulnerability corresponds to [CVE-2026-72804](https://nvd.nist.gov/vuln/detail/CVE-2026-72804).\n\n### Summary\n\n`getGraph` and `getLocalGraph` filter reader sessions against the *visibility* tier only and never check the publish password. Password-protected documents are `Visible = true`, so their graph nodes survive the filter and graph nodes are block-level and carry the block's actual content. An anonymous reader who has never supplied a document's password can therefore retrieve that document's per-block content and its reference/backlink topology. Both endpoints are `CheckAuth`-only, so they are reachable by the publish `RoleReader` token and by the anonymous account when `Publish.Auth.Enable` is `false`.\n\n### Details\n\nBoth handlers filter with the invisible-tier set only:\n\n```go\npublishIgnore := model.GetInvisiblePublishAccess(publishAccess)   // Visible tier ONLY\nnodes, links = model.FilterGraphByPublishIgnore(publishIgnore, nodes, links)\n```\n\n`FilterGraphByPublishIgnore` (`kernel/model/publish_access.go:849`) drops a node only when `!CheckPathAccessableByPublishIgnore(node.Box, node.Path, publishIgnore)`. There is no password evaluation anywhere in the graph code grepping `graph.go` for `CheckPublishAuthCookie` or `password` returns nothing.\n\nBecause password-protected documents are `Visible = true`, their nodes pass the filter unchanged.\n\n**The nodes carry content, not just titles.** `genTreeNodes` emits one node per block, and `nodeTitleLabel` sets `node.Title = node.Label = block.Content` (`kernel/model/graph.go:673-678`). So each surviving node exposes the block's text.\n\nThis is materially broader than the by-design listing behaviour: `listDocsByPath` intentionally exposes protected document *titles* (protected means \"publicly visible, password required to access\"), but the graph endpoints expose per-block *content* and the full link/reference topology, which listing never does.\n\nVerified at `origin/master`: `FilterGraphByPublishIgnore` contains only the `CheckPathAccessableByPublishIgnore` call; `graph.go` contains no password check; both routes are registered `CheckAuth` without `CheckAdminRole`.\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 is marked **protected** (visible, password set) and contains blocks with distinctive content. No password is supplied in any request below.\n\n**Targeted: one protected document's content and reference structure:**\n```\nPOST http://127.0.0.1:6808/api/graph/getLocalGraph\n{\"id\":\"<PROTECTED_DOC_ID>\"}\n```\nReturns nodes whose `Title`/`Label` contain the protected document's per-block content, plus its links/backlinks.\n\n**Workspace-wide: every protected document:**\n```\nPOST http://127.0.0.1:6808/api/graph/getGraph\n{}\n```\nReturns block-level nodes for every protected document in the workspace, together with the complete link graph.\n\n**Control:** requesting the same document through the normal content path returns the password placeholder confirming the password gate is enforced elsewhere and omitted here.\n\n### Impact\n\nAn anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read the block-level content of every password-protected document in the workspace, plus the full reference/backlink topology, without ever supplying a password. This defeats the publish-password control for the graph subsystem. Confidentiality-only, no modification.\n\n### Suggested fix\n\nExtend the graph filter to evaluate the password tier in addition to visibility: in `FilterGraphByPublishIgnore`, drop a node unless the document's publish password is unset or the caller presents a valid publish-auth cookie for it (`password == \"\" || CheckPublishAuthCookie(...)`), matching the sibling filters that enforce both tiers. Consider also excluding block content from node `Title`/`Label` for reader sessions, so the graph conveys structure without document text.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan: Graph endpoints omit the publish-password tier: anonymous readers receive block-level content of password-protected 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 validan el nivel de contraseña de publicación en los endpoints getGraph y getLocalGraph, permitiendo a lectores anónimos recuperar contenido a nivel de bloque de documentos protegidos con contraseña. Los atacantes pueden llamar a estos endpoints sin proporcionar una contraseña para leer el contenido del documento protegido y la topología de referencia completa.","source":"nvd"}],"published":"2026-08-12T19:07:49.197Z","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:H/VI:N/VA:N/SC:H/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"}],"cwes":["CWE-200","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-20260724091654-82e9ded423e4"}],"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-20260724091654-82e9ded423e4"}],"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-vpjw-wf5h-cgpq","tags":["advisory","vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://www.vulncheck.com/advisories/siyuan-before-authentication-bypass-via-graph-endpoints","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72804","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan/commit/82e9ded423e45eabcc96010abd30c0f96bfe0323","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":"none","automatable":"yes","technicalImpact":"partial","date":"2026-08-12T19:48:36.664Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-72804","url":"https://www.cve.org/CVERecord?id=CVE-2026-72804","licence":"CVE Terms of Use","modified":"2026-08-14T16:52:10.272Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vpjw-wf5h-cgpq","url":"https://github.com/advisories/GHSA-vpjw-wf5h-cgpq","licence":"CC-BY-4.0","modified":"2026-09-10T15:25:51.866Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6407","url":"https://pkg.go.dev/vuln/GO-2026-6407","licence":"CC-BY-4.0","modified":"2026-09-10T15:15:15.076Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-72804","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72804","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:32.637Z","epss":{"score":0.00432,"percentile":0.29292,"date":"2026-11-29T12:00:22.000Z"}}