{"id":"CVE-2026-68584","aliases":["CVE-2026-68584","GHSA-7j72-f6wg-cxw6","GO-2026-6382"],"related":[],"kind":"vulnerability","state":"published","title":"SiYuan before v3.7.3 Authentication Bypass via Content Endpoints","summary":"SiYuan versions before v3.7.3 contain an authentication bypass vulnerability in publish mode where content-returning endpoints getHeadingChildrenDOM, getHeading*Transaction, and getBacklinkDoc perform no password check despite protecting the primary getDoc endpoint. Anonymous attackers can retrieve full content of password-protected documents by obtaining internal block IDs from reader-accessible endpoints and calling unprotected content endpoints to bypass the password gate.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SiYuan versions before v3.7.3 contain an authentication bypass vulnerability in publish mode where content-returning endpoints getHeadingChildrenDOM, getHeading*Transaction, and getBacklinkDoc perform no password check despite protecting the primary getDoc endpoint. Anonymous attackers can retrieve full content of password-protected documents by obtaining internal block IDs from reader-accessible endpoints and calling unprotected content endpoints to bypass the password gate.","source":"cvelist"},{"lang":"en","text":"**CVE:** This vulnerability corresponds to [CVE-2026-68584](https://nvd.nist.gov/vuln/detail/CVE-2026-68584).\n\n### Summary\n\nSiYuan's publish mode defines a \"protected\" access level: a document that is publicly listed but requires a password to read (per the product's own UI help text, protected = \"Publicly visible, requires password to access\"). The password is enforced on the primary content path (`getDoc`, via `FilterContentByPublishAccess`).\n\nSeveral other content-returning endpoints `getHeadingChildrenDOM`, `getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/ `getHeadingInsertTransaction`, and `getBacklinkDoc`/`getBackmentionDoc` return rendered block DOM with **no password check at all**. Combined with reader-reachable endpoints that leak a protected document's internal block IDs, an anonymous reader can retrieve the full body of a password-protected document without the password. This has been reproduced end-to-end on a live instance.\n\n### Details\n\n**The password control and where it is enforced.** Publish access has five levels encoded in `visible`/`password`/`disable`: public, protected (password), hidden, private (password), forbidden. `getDoc` correctly enforces the password for protected/private documents via `FilterContentByPublishAccess`. The bug is that other content endpoints do not.\n\n**Content endpoints with no password check (all `CheckAuth`-only):**\n- `getHeadingChildrenDOM` returns rendered DOM of a heading subtree.\n- `getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/`getHeadingInsertTransaction` return rendered heading DOM in the computed transaction payload (no mutation occurs on this path).\n- `getBacklinkDoc`/`getBackmentionDoc` return rendered DOM of referencing blocks.\n\nNone of these invokes the publish-password check that `getDoc` applies. Each converts a block ID into full rendered content regardless of the containing document's protected/password status.\n\n**The ID-leak that removes the precondition.** A protected document is, by design, publicly listed (`listDocsByPath` filters on `visible`, and protected documents are visible), so an anonymous reader obtains the document's root ID. The document's internal block/heading IDs are then obtainable from reader-reachable endpoints notably the `searchEmbedBlock` endpoint (reported separately), whose post-query filter `FilterEmbedBlocksByPublishAccess` **replaces the content string but retains the block ID**. So the \"filtered\" search still yields the protected document's internal heading IDs. (Other reader-reachable endpoints also leak block IDs, the vulnerability does not depend on any single ID source.)\n\n**The chain, reproduced on a live instance.** Against a real protected document (password set), an anonymous reader on port 6808 with no token and no password:\n\n1. `getDoc(protectedDoc)` → returns the password-required placeholder (correctly blocked).\n2. `searchEmbedBlock` with a statement selecting heading blocks for the document's root ID → returns the heading IDs (content filtered, IDs retained).\n3. `getHeadingChildrenDOM(headingId)` → returns the full rendered body of the protected document, including its protected content.\n\nThe password gate that step 1 enforces is entirely bypassed by step 3.\n\n### Proof of Concept\n\nReproduced on a local instance (SiYuan running locally, publish mode enabled on port 6808, publish Basic Auth disabled). Setup: a document marked \"protected\" with password, whose body contains the unique marker `TOP_SECRET_CRITICAL_123`.\n\n**1. Confirm the password gate blocks the primary path (anonymous, port 6808):**\n```\nPOST http://127.0.0.1:6808/api/filetree/getDoc\n{\"id\":\"PROTECTED_DOC\"}\n```\nReturns the password-required placeholder correctly blocked.\n\n**2. Leak the protected document's heading ID (anonymous, port 6808):**\n```\nPOST http://127.0.0.1:6808/api/search/searchEmbedBlock\n{\"stmt\":\"SELECT * FROM blocks WHERE root_id='PROTECTED_DOC' AND type='h'\"}\n```\nReturns heading blocks with their IDs; the content field is filtered but the block ID is retained.\n\n**3. Retrieve the protected content without the password (anonymous, port 6808):**\n```\nPOST http://127.0.0.1:6808/api/block/getHeadingChildrenDOM\n{\"id\":\"HEADING_ID\"}\n```\nReturns HTTP 200 with the rendered body of the protected document, including `TOP_SECRET_CRITICAL_123` retrieved with no token and no password.\n\n`getHeadingDeleteTransaction`/`getHeadingLevelTransaction`/`getHeadingInsertTransaction` and `getBacklinkDoc`/ `getBackmentionDoc` provide the same password-free content retrieval given a block ID from the protected document.\n\n### Impact\n\nAn anonymous reader (publish mode with auth disabled) or any publish `RoleReader` can read the full content of a password-protected published document without the password, defeating the \"protected\" access control the product documents as a password gate. The core defect is that these content-returning endpoints perform no publish-password check; the ID-leak endpoints (multiple sources) supply the block IDs that make the bypass reachable anonymously and untargeted. Impact is confidentiality-only (content disclosure); no modification occurs on these paths. Encrypted notebooks are out of scope.\n\n### Suggested fix\n\nApply the publish-password/publish-access check that `getDoc` uses (`FilterContentByPublishAccess`/`IsReadOnlyRoleContext` plus the password-cookie check) to every content-returning endpoint: `getHeadingChildrenDOM`, the three `getHeading*Transaction` handlers, and `getBacklinkDoc`/`getBackmentionDoc`. Separately, `FilterEmbedBlocksByPublishAccess` should omit filtered blocks entirely rather than blanking the content while retaining the ID, so that filtered results cannot be used to enumerate a protected document's internal block IDs. The durable fix is to enforce the publish boundary in the shared render/DOM path rather than per-handler, since any content endpoint that omits the check reintroduces this class.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SiYuan: Anonymous publish-password authentication bypass via getHeadingChildrenDOM / getHeading*Transaction / getBacklinkDoc (publish mode) in github.com/siyuan-note/siyuan/kernel","format":"markdown","source":"go"},{"lang":"es","text":"Las versiones de SiYuan anteriores a la v3.7.3 contienen una vulnerabilidad de omisión de autenticación en modo de publicación donde los puntos finales que devuelven contenido getHeadingChildrenDOM, getHeadingTransaction y getBacklinkDoc no realizan ninguna comprobación de contraseña a pesar de proteger el punto final principal getDoc. Atacantes anónimos pueden recuperar el contenido completo de documentos protegidos con contraseña al obtener IDs de bloque internos de puntos finales accesibles para lectores y llamar a puntos finales de contenido desprotegidos para omitir la puerta de contraseña.","source":"nvd"}],"published":"2026-08-03T13:20:36.458Z","modified":"2026-10-23T21:10:00.157Z","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-288"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.7.3","status":"affected"},{"type":"semver","version":"3.7.3","status":"unaffected"}],"vendor":"siyuan-note","product":"siyuan","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260721020826-2d069dce84a2"}],"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-20260721020826-2d069dce84a2"}],"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-7j72-f6wg-cxw6","tags":["advisory","vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://www.vulncheck.com/advisories/siyuan-before-authentication-bypass-via-content-endpoints","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68584","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/siyuan-note/siyuan/commit/2d069dce84a25c959ef0093c72c98e05778ef218","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-03T20:02:02.277Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-68584","url":"https://www.cve.org/CVERecord?id=CVE-2026-68584","licence":"CVE Terms of Use","modified":"2026-08-14T16:51:06.898Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7j72-f6wg-cxw6","url":"https://github.com/advisories/GHSA-7j72-f6wg-cxw6","licence":"CC-BY-4.0","modified":"2026-09-10T15:25:31.479Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6382","url":"https://pkg.go.dev/vuln/GO-2026-6382","licence":"CC-BY-4.0","modified":"2026-09-10T15:15:13.551Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-68584","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68584","licence":"Public domain","modified":"2026-10-23T21:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:30.864Z","epss":{"score":0.00329,"percentile":0.28059,"date":"2026-12-01T12:00:22.000Z"}}