Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Unauthenticated publish visitor reaches the endpoint over the network with a simple UNION payload (AV:N/AC:L/PR:N/UI:N); impact is disclosure of hidden documents only, so C:H, I:N, A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
SiYuan is an open-source personal knowledge management system. Prior to 3.7.1, the block search endpoint POST /api/search/fullTextSearchBlock concatenates attacker-controlled paths values into SQL predicates used by non-SQL search modes, allowing an unauthenticated publish visitor to inject a UNION SELECT and return rows from hidden documents by projecting an allowed visible box and path. This issue is fixed in versions 3.7.1.
AnalysisAI
SQL injection in SiYuan's block-search endpoint (POST /api/search/fullTextSearchBlock) before version 3.7.1 lets an unauthenticated publish-mode visitor read documents they should not see. The endpoint concatenates attacker-controlled paths values directly into SQL predicates used by its non-SQL search modes, enabling a UNION SELECT that projects rows from hidden documents by spoofing an allowed visible box and path. No public exploit has been identified at time of analysis, and the issue is not listed in CISA KEV; CVSS is 7.5 reflecting confidentiality-only impact.
Technical ContextAI
SiYuan is a self-hosted, open-source personal knowledge management (PKM) system that stores notes as 'blocks' indexed in an embedded SQL database (SQLite). Its 'publish' feature exposes a read-only web view of selected notebooks to visitors. The full-text block search endpoint supports several search modes; for the non-SQL modes it still builds SQL predicates internally, and the user-supplied paths filter is string-concatenated into those predicates rather than bound as a parameter. This is a textbook CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) flaw: because the input reaches the query as raw SQL, an attacker can close the intended predicate and append a UNION SELECT that returns arbitrary rows, bypassing the visibility scoping that normally restricts a publish visitor to permitted boxes and paths.
RemediationAI
Vendor-released patch: 3.7.1 - upgrade all SiYuan instances to 3.7.1 or later, which fixes the input handling in the search endpoint (see commits 57bcad4b331836880bfe6be25d4180bdcf10db0d and d0f0fe146fb07d594fcadc4f48d4f7c30ac01d1e and the release at https://github.com/siyuan-note/siyuan/releases/tag/v3.7.1). Until you can patch, the most effective compensating control is to disable or take offline the publish feature so no unauthenticated visitor can reach POST /api/search/fullTextSearchBlock, at the cost of losing public note sharing; alternatively place the published instance behind an authenticating reverse proxy or IP allowlist, or block/restrict access to the /api/search/ path at the proxy, accepting that this may break legitimate visitor search functionality. Refer to the advisory GHSA-h89q-4j2h-7h88 for vendor guidance.
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
Reflected XSS in SiYuan knowledge management before 3.5.9.
SiYuan knowledge management system prior to 3.5.5 has a path traversal in /api/file/copyFile allowing arbitrary file ope
SiYuan version 3.0.3 allows executing arbitrary commands on the server. Rated critical severity (CVSS 9.0), this vulnera
SQL injection in SiYuan prior to version 3.6.0 allows any authenticated user, including those with read-only access, to
Cross-site scripting (XSS) in SiYuan personal knowledge management system versions 3.6.0-3.6.1 allows remote attackers t
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-42742
GHSA-h89q-4j2h-7h88