CVE-2026-74904: SiYuan: missing authorization in 17 block API endpoints
GHSA-4vpg-gwqq-w44cHIGHCISA: TRACK*SiYuan, a self-hosted note-taking and knowledge-base app, exposes 17 `/api/block/*` handlers that are gated only by `CheckAuth` and have no read-only/publish-access check. An anonymous visitor to a published workspace can pull content-derived text (`getRefText`) and structural or existence metadata for any block ID, including blocks in notebooks that were never published. Exploitation is trivial (a single unauthenticated curl), but the practical risk is moderate. EPSS is low at 0.5% (59th percentile), there is no public exploit, no Nuclei template and no KISA/CISA KEV listing, and the package has 3,047 downstream dependents. It matters most where SiYuan holds AI research notes, prompts, or RAG source material and is exposed to the internet through the publish service. Upgrade to v3.8.0 or later (the Go module fix is 0.0.0-20260804015139-bd067a4fe9b2), and until then take publish mode off the public internet or put it behind an authenticating reverse proxy.
What is the risk?
High by CVSS (7.5): network-reachable, low complexity, no privileges or user interaction, high confidentiality impact. Real-world risk is tempered by a low EPSS (0.00504, 59th percentile), no known public exploit or scanner template, and no KEV listing. Exposure is limited to workspaces that run SiYuan publish/server mode and are reachable by untrusted users. Impact is read-only: no integrity or availability effect. Block ID guessing is a practical constraint, but the existence-oracle endpoints and the companion `getIDsByHPath` title-guessing primitive make enumeration efficient. The maintainers' OpenSSF Scorecard (5.8/10) and 62 other CVEs in the same package suggest a recurring authorization-hygiene problem, not an isolated bug.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter Notebook | go | < 0.0.0-20260804015139-bd067a4fe9b2 | 0.0.0-20260804015139-bd067a4fe9b2 |
Do you use Jupyter Notebook? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade SiYuan to v3.8.0 or later (Go module version 0.0.0-20260804015139-bd067a4fe9b2 or newer). 2) If you cannot patch immediately, do not expose the kernel port (6806) or publish service to the internet; restrict it by network ACL, VPN, or an authenticating reverse proxy. 3) Set and enforce an access auth code on the workspace. 4) Detection: review reverse-proxy and access logs for unauthenticated POSTs to
/api/block/getRefText,checkBlockExist,checkBlocksExist,checkBlockRef,getBlockBreadcrumb, and the other listed endpoints, especially high-volume sequential ID probing from a single source. 5) Treat any content that sat in unpublished notebooks of an exposed instance as potentially disclosed and rotate any secrets or credentials stored in notes. 6) For maintainers and internal auditors: grep every/api/*handler forIsReadOnlyRoleContextand review each that lacks it.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-74904?
SiYuan, a self-hosted note-taking and knowledge-base app, exposes 17 `/api/block/*` handlers that are gated only by `CheckAuth` and have no read-only/publish-access check. An anonymous visitor to a published workspace can pull content-derived text (`getRefText`) and structural or existence metadata for any block ID, including blocks in notebooks that were never published. Exploitation is trivial (a single unauthenticated curl), but the practical risk is moderate. EPSS is low at 0.5% (59th percentile), there is no public exploit, no Nuclei template and no KISA/CISA KEV listing, and the package has 3,047 downstream dependents. It matters most where SiYuan holds AI research notes, prompts, or RAG source material and is exposed to the internet through the publish service. Upgrade to v3.8.0 or later (the Go module fix is 0.0.0-20260804015139-bd067a4fe9b2), and until then take publish mode off the public internet or put it behind an authenticating reverse proxy.
Is CVE-2026-74904 actively exploited?
No confirmed active exploitation of CVE-2026-74904 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-74904?
1) Upgrade SiYuan to v3.8.0 or later (Go module version 0.0.0-20260804015139-bd067a4fe9b2 or newer). 2) If you cannot patch immediately, do not expose the kernel port (6806) or publish service to the internet; restrict it by network ACL, VPN, or an authenticating reverse proxy. 3) Set and enforce an access auth code on the workspace. 4) Detection: review reverse-proxy and access logs for unauthenticated POSTs to `/api/block/getRefText`, `checkBlockExist`, `checkBlocksExist`, `checkBlockRef`, `getBlockBreadcrumb`, and the other listed endpoints, especially high-volume sequential ID probing from a single source. 5) Treat any content that sat in unpublished notebooks of an exposed instance as potentially disclosed and rotate any secrets or credentials stored in notes. 6) For maintainers and internal auditors: grep every `/api/*` handler for `IsReadOnlyRoleContext` and review each that lacks it.
What systems are affected by CVE-2026-74904?
This vulnerability affects the following AI/ML architecture patterns: Knowledge management platforms, RAG source document stores, Self-hosted note-taking servers, AI research documentation workflows.
What is the CVSS score for CVE-2026-74904?
CVE-2026-74904 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.45%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0007Discover AI ArtifactsAML.T0036Data from Information RepositoriesAML.T0049Exploit Public-Facing ApplicationCompliance Controls Affected
What are the technical details?
Original Advisory
Same CWE-862 family, found via an automated bulk sweep of every `/api/block/*` handler in `kernel/api/block.go` for the presence of any access-check reference (`IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`) anywhere in the function body. 17 of 28 candidate endpoints have none. Cross-checked against the file's own sibling functions (`getBlockInfo`, `getBlockDOM`, `getRefIDs`, etc.), which correctly implement the check, confirming this is a real, uneven gap rather than a deliberate design choice for the whole file. ### Summary 17 handlers in `kernel/api/block.go`, all gated only by `model.CheckAuth` with no admin-role requirement, return block content-derived text, structural metadata, or existence information for any block ID supplied, with no access check anywhere in the handler or, for the ones checked in detail, the model functions they call. This is CWE-862 (Missing Authorization), the same class as the companion advisories from this review round, found in a different file via a systematic bulk check rather than manual inspection of each function individually. ### Details Confirmed via automated extraction of every function body between `func NAME(c *gin.Context) {` and the next such declaration, then searching each for any of `IsReadOnlyRoleContext`, `checkBlockPublishAccess`, `GetPublishAccess`, or `PublishAccess`. The following contain none of these, at all: | Endpoint | What it discloses | |---|---| | `getRefText` | The block's actual reference-display text, derived from its content, for any ID (`kernel/api/block.go:564`) | | `getBlockBreadcrumb` | The block's breadcrumb/title path (`:?`) | | `getBlockDefIDsByRefText` | Which block IDs a given reference text resolves to | | `getRefIDsByFileAnnotationID` | Block IDs referencing a given PDF/file annotation | | `getBlockIndex` / `getBlocksIndexes` | A block's position/index within its document | | `getTreeStat` | Structural statistics for a document tree | | `getBlocksWordCount` / `getContentWordCount` | Word/character counts for arbitrary content | | `checkBlockExist` / `checkBlocksExist` | Existence oracle for any block ID | | `getUnfoldedParentID` | The nearest unfolded ancestor of a block | | `checkBlockFold` | Whether a block is currently folded | | `getBlockSiblingID` | A block's sibling in document order | | `getBlockRelevantIDs` | IDs of blocks related to a given block | | `getBlockTreeInfos` | Block tree metadata for a set of IDs | | `checkBlockRef` | Whether a block is referenced elsewhere | The clearest, most severe example, `getRefText` (`POST /api/block/getRefText`, `kernel/api/router.go:238`): ```go func getRefText(c *gin.Context) { ... id := arg["id"].(string) if util.InvalidIDPattern(id, ret) { return } var refText string if notebook, ok := arg["notebook"].(string); ok && notebook != "" && model.IsEncryptedBox(notebook) { refText = model.GetBlockRefTextInBox(id, notebook) } else { refText = model.GetBlockRefText(id) } ... ret.Data = refText } ``` `model.GetBlockRefText(id)` resolves the actual display text used wherever this block is referenced, ordinarily derived from the block's real content, for any `id` in the workspace, with no scoping. For contrast, sibling functions in the same file correctly implement the check, e.g. `getRefIDs` (`kernel/api/router.go:235`) and `getBlockInfo`/`getBlockDOM`/`getBlockKramdown` all contain `if model.IsReadOnlyRoleContext(c) { ... }` guards. This confirms the 17 above are an inconsistency within the file, not an intentional decision that the whole file is exempt from this control. ### Step-by-step reproduction ```bash # id: a block inside a document that was never published, or is # Disable=true in publish access curl -s -X POST http://<target>:6806/api/block/getRefText \ -H "Content-Type: application/json" -d '{"id":"<private-block-id>"}' # Returns the block's actual reference text with no session, no # AccessAuthCode, no publish password. curl -s -X POST http://<target>:6806/api/block/checkBlockExist \ -H "Content-Type: application/json" -d '{"id":"<guessed-block-id>"}' # Confirms or denies existence of any guessed ID workspace-wide. ``` Repeat against any of the other 15 endpoints in the table above, substituting their expected arguments, each returns data with no access check. ### Impact Any published SiYuan workspace discloses block-level content-derived text, structural metadata, and existence information for the *entire* workspace, not just published notebooks, to any anonymous internet visitor. `getRefText` in particular discloses real content text, not just metadata, for any block ID. The existence-oracle endpoints (`checkBlockExist`/`checkBlockRef`) combine with the companion advisory's `getIDsByHPath` title-guessing primitive to let an attacker efficiently probe for and confirm private content without ever needing legitimate access. ``` ## Affected products | Field | Value | |---|---| | Ecosystem | **Go** | | Package name | `github.com/siyuan-note/siyuan/kernel` | | Affected versions | Present at current HEAD (commit `eef1056`/`1673b75`, reviewed 2026-08-03) | | Patched versions | *(none yet, leave blank until a fix is released)* | ## Severity | Field | Value | |---|---| | Vector string | `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N` | | Score | **7.5 (High)**. Network vector, low complexity, no privileges or user interaction required, high confidentiality impact via `getRefText`'s real content-text disclosure plus the combined structural/existence oracle from the other 16, no integrity/availability impact since all 17 are read-only. | ## Weaknesses (CWE) - **CWE-862**: Missing Authorization (primary) - **CWE-204**: Observable Response Discrepancy (contributing, via the existence-oracle endpoints) ## Notes for filing - Same CWE-862 family as the two companion advisories from this review round (asset/attribute-view listing, and path/title resolution). Recommend the maintainers treat all three as one remediation pass: grep every `/api/*` handler for the literal presence of `IsReadOnlyRoleContext` and manually audit every one that lacks it, rather than fixing endpoint-by-endpoint, since the pattern has now recurred across three separate files. - Suggested fix: add `if model.IsReadOnlyRoleContext(c) { ... }` guards matching the pattern already correctly used by this file's own `getBlockInfo`/`getBlockDOM`/`getRefIDs` functions.
Exploitation Scenario
An attacker finds an internet-facing SiYuan publish instance used by an AI security team to keep red-team notes, prompt-injection test cases and model evaluation results. Without authenticating, they use `getIDsByHPath` (companion issue) or guessed or leaked block IDs to find candidate IDs, then confirm them through `checkBlockExist` and `checkBlockRef`. They call `POST /api/block/getRefText` on each confirmed ID to read the display text derived from private blocks, and use `getBlockBreadcrumb` and `getBlockTreeInfos` to map the document hierarchy. The result is reconnaissance of unpublished research, vulnerability findings and internal AI system details, which can then feed targeted attacks against the organization's AI systems.
Weaknesses (CWE)
CWE-204 — Observable Response Discrepancy: The product provides different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside of the intended control sphere.
- [Architecture and Design] Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- [Implementation] Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
- github.com/advisories/GHSA-4vpg-gwqq-w44c
- github.com/siyuan-note/siyuan/commit/bd067a4fe9b208c0858d8d9dc6220dc8affc403e
- github.com/siyuan-note/siyuan/releases/tag/v3.8.0
- github.com/siyuan-note/siyuan/security/advisories/GHSA-4vpg-gwqq-w44c
- nvd.nist.gov/vuln/detail/CVE-2026-74904
- vulncheck.com/advisories/siyuan-before-missing-authorization-via-block-api
Timeline
Related Vulnerabilities
CVE-2026-7281110.0SiYuan: SQL injection enables cross-notebook DB access
Same package: notebookCVE-2026-6908510.0SiYuan: SQL injection in searchDocs allows DB tampering
Same package: notebookCVE-2026-6908410.0SiYuan: SQL injection in search endpoint exposes notebooks
Same package: notebookCVE-2026-6908310.0SiYuan: unauthenticated SQLi in full-text search endpoint
Same package: notebookCVE-2026-11105710.0Mercury: regex blocklist bypass allows unauthenticated RCE
Same package: notebook