{"items":[{"id":"NVI-00014203","kind":"vulnerability","title":"SiYuan: SQL Query in Block Search Exposes Hidden Published Document Content","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-h89q-4j2h-7h88","CVE-2026-59834"],"plain_summary":"GitHub lists this reviewed advisory for github.com/siyuan-note/siyuan/kernel. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-5a03bf5e949e6567a9c19c221b9f1c19"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-09-02T14:16:09.000Z","value":"7.5 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-5a03bf5e949e6567a9c19c221b9f1c19"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-5a03bf5e949e6567a9c19c221b9f1c19","url":"https://github.com/advisories/GHSA-h89q-4j2h-7h88","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-h89q-4j2h-7h88","publisher":"GitHub Advisory Database","observed_at":"2026-11-02T02:21:43.711Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-5a03bf5e949e6567a9c19c221b9f1c19"],"technology":"github.com/siyuan-note/siyuan/kernel","known_exclusions":[],"conditions_summary":"## Summary\n\nSiyuan'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`.\n\nAn 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.\n\n## Affected Code\n\nThe API blocks explicit SQL search mode for non-admin users, but allows other search methods to use caller-controlled paths:\n\n```go\nif method == 2 && !model.IsAdminRoleContext(c) {\n    ret.Code = -1\n    ret.Msg = \"SQL search requires administrator privileges\"\n    return\n}\n\nblocks, matchedBlockCount, matchedRootCount, pageCount, docMode := model.FullTextSearchBlock(query, boxes, paths, types, method, orderBy, groupBy, page, pageSize)\nif model.IsReadOnlyRoleContext(c) {\n    publishAccess := model.GetPublishAccess()\n    blocks = model.FilterBlocksByPublishAccess(c, publishAcces","public_affected_ranges":["< 0.0.0-20260704035518-d0f0fe146fb0"]}],"null_published_at":"2026-11-02T10:00:37.224Z","source_updated_at":"2026-09-02T14:16:09.000Z","source_disclosed_at":"2026-09-02T14:16:08.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-02T02:21:43.711Z"}],"next_cursor":null,"snapshot_revision":"42594"}