Listen to this Post
CVE-2026-72799 affects SiYuan Publish’s filetree API. Five endpoints (getFullHPathByID, getHPathByID, getPathByID, getIDsByHPath, getHPathByPath) lack publish‑access checks. They are only protected by CheckAuth, making them accessible to any authenticated reader (RoleReader) or anonymous user when Publish.Auth.Enable is false. These endpoints resolve arbitrary document IDs or paths without verifying if the document is publish‑visible. Thus an attacker can map the entire private document tree: notebook names, folder hierarchy, and document s for hidden, password‑protected, or publish‑forbidden documents. Additionally, they can convert paths to document IDs, which are needed for other block‑read endpoints. The vulnerability stems from missing calls to IsReadOnlyRoleContext, CheckBlockIdAccessableByPublishAccess, or CheckPathAccessableByPublishIgnore. This contrasts with other endpoints like getRecentDocs which do filter. The issue was verified in origin/master (commit eef105683). The PoC shows that with a valid document ID, one can retrieve full path, notebook, and storage path; and with a path and notebook, enumerate IDs. No password or membership required. This breaks the intended block‑metadata protection introduced in commit ffde3b21e. Impact is confidentiality‑only, but document s can reveal sensitive information. The lack of filtering enables two primary operations: (1) getFullHPathByID and getPathByID reveal full paths and notebook/storage locations for any document ID; (2) getIDsByHPath converts a guessed or known path into document IDs, eliminating the need to know an ID beforehand. Document s themselves can be sensitive (project names, personnel actions). This disclosure violates the intended block‑metadata protection. The PoC is simple: send POST requests to the endpoints with an ID or path. The responses return data for documents that are not published, without requiring password or membership. The vulnerability is classified as confidentiality‑only but can be a stepping stone for further attacks.
DailyCVE Form:
Platform: SiYuan Publish
Version: Current master
Vulnerability: Information Disclosure
Severity: Medium
Date: 2026-09-04
Prediction: Patch expected soon
What Undercode Say:
Resolve full path from document ID
curl -X POST http://127.0.0.1:6808/api/filetree/getFullHPathByID -H "Content-Type: application/json" -d '{"id":"<DOC_ID>"}'
Get notebook and storage path
curl -X POST http://127.0.0.1:6808/api/filetree/getPathByID -H "Content-Type: application/json" -d '{"id":"<DOC_ID>"}'
Enumerate IDs from a path
curl -X POST http://127.0.0.1:6808/api/filetree/getIDsByHPath -H "Content-Type: application/json" -d '{"path":"/Confidential","notebook":"<BOX_ID>"}'
Example script to iterate over known IDs
for id in $(cat doc_ids.txt); do
curl -s -X POST http://127.0.0.1:6808/api/filetree/getFullHPathByID -H "Content-Type: application/json" -d "{\"id\":\"$id\"}"
done
Exploit: (Educational Purposes!)
- Obtain a target document ID (e.g., from public sources or guess common patterns).
- Call getFullHPathByID with that ID to retrieve the full path (e.g., /MySecretNotebook/Confidential/Q3 Layoffs Plan).
- Call getPathByID with the same ID to extract the notebook ID (BOX_ID) and storage path.
- Use the obtained notebook ID and a guessed or known folder path (e.g., /Confidential) with getIDsByHPath to enumerate all document IDs under that folder.
- Repeat step 4 for different paths to map the entire private document tree.
- Use the enumerated IDs in other block‑read endpoints (e.g., getBlockInfo) to fetch actual content, bypassing publish restrictions.
Protection:
- Apply the recommended fix: gate each of the five handlers with CheckBlockIdAccessableByPublishAccess (or restrict resolution to publish‑visible documents) for IsReadOnlyRoleContext sessions.
- Alternatively, implement a global filter that verifies publish‑access before any filetree resolution.
- Disable anonymous access (set Publish.Auth.Enable to true) and enforce strong authentication for all readers, though this only reduces the attack surface; authenticated readers still have full access.
- Monitor logs for unusual patterns of requests to these endpoints, especially from low‑privilege accounts.
Impact:
An attacker can enumerate all notebook names, folder structures, and document s for content that the administrator marked hidden, password‑protected, or excluded from publishing. Document s alone often contain sensitive information (project names, personnel actions, client identifiers). Moreover, the ability to resolve s to valid document IDs removes the “attacker must know an ID” precondition, enabling further access to block‑read endpoints and potentially exposing the actual content of private documents. Confidentiality is the primary concern, and this can lead to full disclosure of the document repository structure and metadata.
🎯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

