CVE-2026-74904
SiYuan before v3.7.4 Missing Authorization via block API
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.7
SiYuan before v3.7.4 Missing Authorization via block API
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
- Record
CVE-2026-74904- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
EUVDEUVD-2026-60585
8.7
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
- Record
EUVD-2026-60585- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-4vpg-gwqq-w44c
7.5
SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers
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):
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
# 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…
- Record
GHSA-4vpg-gwqq-w44c- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-204, CWE-862
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-69jp-f2p8-9vrg
8.7
Duplicate Advisory: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-4vpg-gwqq-w44c. This link is maintained to preserve external references.
Original Description
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
- Record
GHSA-69jp-f2p8-9vrg- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
NVD
8.7
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
- Record
CVE-2026-74904- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSVGHSA-4vpg-gwqq-w44c
7.5
SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers
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):
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
# 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…
- Record
GHSA-4vpg-gwqq-w44c- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-204, CWE-862
- Updated
- 2026-11-02
OSVGHSA-69jp-f2p8-9vrg
8.7
Duplicate Advisory: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-4vpg-gwqq-w44c. This link is maintained to preserve external references.
Original Description
SiYuan before v3.7.4 is missing authorization checks in 17 block metadata/content endpoints in kernel/api/block.go (including getRefText, checkBlockExist, and getBlockBreadcrumb). These handlers are gated only by basic authentication (model.CheckAuth) and lack publish-access filtering, allowing anonymous publish-mode readers to disclose private block content-derived text, structural metadata, and existence information for arbitrary block IDs across the workspace.
- Record
GHSA-69jp-f2p8-9vrg- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-862
- Updated
- 2026-11-02
OSVGO-2026-6654 No score
SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel
SiYuan: 17 block metadata/content endpoints in kernel/api/block.go have zero publish-access filtering, reachable by anonymous publish-mode readers in github.com/siyuan-note/siyuan/kernel
- Record
GO-2026-6654- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/siyuan-note/siyuan/kernelGo |
before 0.0.0-20260804015139-bd067a4fe9b2 | 0.0.0-20260804015139-bd067a4fe9b2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-74904 is a high vulnerability (CVSS 8.7) in Siyuan-note Siyuan, published August 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.45%, the 39th percentile. Fixed in github.com/siyuan-note/siyuan/kernel 0.0.0-20260804015139-bd067a4fe9b2.
References
github.com/siyuan-note/siyuan/security/advisories/GHSA-4vpg-gwqq-w44c
vulncheck.com/advisories/siyuan-before-missing-authorization-via-block-api
nvd.nist.gov/vuln/detail/CVE-2026-74904
github.com/siyuan-note/siyuan/commit/bd067a4fe9b208c0858d8d9dc6220dc8affc403e
github.com/siyuan-note/siyuan/releases/tag/v3.8.0
github.com/advisories/GHSA-4vpg-gwqq-w44c
github.com/advisories/GHSA-69jp-f2p8-9vrg
github.com/siyuan-note/siyuan
Left out here: the rest of 2 source descriptions. The JSON record has them.