SiYuan Note, Missing Authorization Check, CVE-2026-72805 (Medium) -DC-Sep2026-2184

Listen to this Post

The vulnerability resides in SiYuan Note’s publish API handlers, specifically within kernel/api/block.go. The `getBlockInfo` endpoint correctly gates access using `checkBlockPublishAccess` to verify that the requested block belongs to a publish-allowed document before returning root, , and path metadata. However, three sibling endpoints—getBlockBreadcrumb, getRefText, and getBlockTreeInfos—omit this critical guard while being protected only by CheckAuth. This makes them reachable via the publish `RoleReader` token, and even anonymously when `Publish.Auth.Enable` is false. An attacker with a valid block ID (which can be harvested from other reader-accessible endpoints) can therefore retrieve sensitive data from documents explicitly marked as publish-forbidden or protected by a publish password. `getBlockBreadcrumb` returns the full ancestor chain including each ancestor block’s content snippet, effectively exposing document s and nested content. `getRefText` returns the block’s reference/anchor text, which constitutes actual document content, not just metadata. `getBlockTreeInfos` returns root ID, , and path for arbitrary block IDs via `model.GetBlockTreeInfosInBox` without any publish-access filtering. Furthermore, both `getBlockBreadcrumb` and `getRefText` accept a client-supplied `notebook` argument that routes to the `InBox` variants, meaning the same unguarded path applies to encrypted notebooks while they are unlocked. The proof of concept confirms that the gated `getBlockInfo` correctly blocks access, while the three ungated handlers disclose data without restriction. Code inspection at origin/master (commit eef10568) shows no publish-access, publish-ignore, or readonly-role checks in the bodies of these three endpoints. The correct primitive already exists and is used by getBlockInfo; these handlers simply fail to call it. The suggested fix is straightforward: add `checkBlockPublishAccess` calls in each vulnerable handler, and for `getBlockTreeInfos` apply the check per ID, dropping unauthorized entries. The same boundary must be enforced in the `InBox` variants (GetBlockRefTextInBox, BuildBlockBreadcrumbInBox) to cover the notebook-argument path. This vulnerability compromises confidentiality of restricted documents and encrypted notebook content while unlocked, requiring only a known block ID as precondition.

DailyCVE Form:

Platform: SiYuan Note
Version: master eef10568
Vulnerability: Missing Publish Check
Severity: Medium (5.3)
date: 2026-09-04

Prediction: 2026-09-15

What Undercode Say:

Analytics – verify vulnerability with curl commands and block-ID enumeration.

Check gated endpoint (should block)
curl -X POST http://127.0.0.1:6808/api/block/getBlockInfo \
-H "Content-Type: application/json" -d '{"id":"BLOCK_ID"}'
Ungated disclosure via getBlockBreadcrumb (returns ancestor snippets)
curl -X POST http://127.0.0.1:6808/api/block/getBlockBreadcrumb \
-H "Content-Type: application/json" -d '{"id":"BLOCK_ID"}'
Ungated disclosure via getRefText (returns anchor text)
curl -X POST http://127.0.0.1:6808/api/block/getRefText \
-H "Content-Type: application/json" -d '{"id":"BLOCK_ID"}'
Ungated disclosure via getBlockTreeInfos (returns root//path)
curl -X POST http://127.0.0.1:6808/api/block/getBlockTreeInfos \
-H "Content-Type: application/json" -d '{"ids":["BLOCK_ID"]}'
For encrypted notebooks, add notebook parameter:
curl -X POST http://127.0.0.1:6808/api/block/getRefText \
-H "Content-Type: application/json" -d '{"id":"BLOCK_ID","notebook":"NOTEBOOK_ID"}'

Exploit: (Educational Purposes!)

  1. Obtain a target block ID from public feeds or by enumerating known block endpoints (e.g., `/api/search` or exported references).
  2. With the block ID, send an unauthenticated POST request (or using RoleReader token) to `getBlockBreadcrumb` to retrieve the full document and ancestor content snippets.
  3. Send a POST request to `getRefText` with the same ID to extract the exact reference/anchor text from the forbidden document.
  4. Send a POST request to `getBlockTreeInfos` with the ID in an `ids` array to obtain the root ID, , and path hierarchy.
  5. If the target is inside an encrypted notebook and the notebook is currently unlocked, repeat steps 2–3 with the `notebook` argument set to that notebook’s ID to bypass the encryption boundary.

Protection: from this CVE

Apply the official patch once released (expected mid-September 2026). As a temporary mitigation, set `Publish.Auth.Enable = true` to require authentication for publish readers, or manually modify `kernel/api/block.go` to insert `checkBlockPublishAccess` calls at the start of getBlockBreadcrumb, getRefText, and `getBlockTreeInfos` – for the batch endpoint, iterate over each ID and drop entries where the check fails. Additionally, audit the `InBox` variants (GetBlockRefTextInBox, BuildBlockBreadcrumbInBox) to ensure they call the same publish-boundary function before returning data.

Impact:

An anonymous reader (when publish auth is disabled) or any publish RoleReader can read, for documents explicitly excluded from publishing or protected by a publish password: the document and full ancestor chain including ancestor block content snippets (via getBlockBreadcrumb); block reference/anchor text i.e., actual document content (via getRefText); and root ID, , and path metadata for arbitrary block IDs (via getBlockTreeInfos). The same disclosure applies to encrypted notebooks while they are unlocked because the vulnerable handlers accept a notebook argument that routes to the unguarded `InBox` variants. The attack requires only a block ID, which is obtainable from other reader-reachable endpoints, and results in a confidentiality breach of restricted content.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top