CVE-2026-59834: SiYuan: SQL Query in Block Search Exposes Hidden Published Document Content
Siyuan’s block search endpoint concatenates attacker-controlled paths[] values into SQL predicates used by non-SQL search modes. Through Siyuan’s publish service, an unauthenticated visitor is forwarded to the kernel with a reader-role token and can reach POST /api/search/fullTextSearchBlock.
An attacker can inject a UNION SELECT through paths[] and return rows from hidden documents while projecting an allowed visible box and path. The post-query publish access filter trusts the projected box and path, so the injected hidden row is returned to the publish visitor.
References
- github.com/advisories/GHSA-h89q-4j2h-7h88
- github.com/siyuan-note/siyuan/commit/57bcad4b331836880bfe6be25d4180bdcf10db0d
- github.com/siyuan-note/siyuan/commit/d0f0fe146fb07d594fcadc4f48d4f7c30ac01d1e
- github.com/siyuan-note/siyuan/releases/tag/v3.7.1
- github.com/siyuan-note/siyuan/security/advisories/GHSA-h89q-4j2h-7h88
- nvd.nist.gov/vuln/detail/CVE-2026-59834
Code Behaviors & Features
Detect and mitigate CVE-2026-59834 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →