Security Digest · Vulnerability record

CVE-2026-69085: SiYuan: Unauthenticated SQL injection in searchDocs via unescaped keyword (publish mode): cross-notebook read/write with statement stacking

SiYuan before v3.7.3 contains a SQL injection vulnerability in the /api/filetree/searchDocs endpoint, where the caller-supplied keyword parameter is concatenated directly into SQL statements with no escaping or parameter binding.

CVSS 9.9 Critical EPSS 1.5% · p74

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 1.5%, percentile 74: FIRST’s model estimates a 1.5% chance of exploitation activity in the next 30 days, higher than 74% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes github.com/siyuan-note/siyuan/kernel (Go) < 0.0.0-20260721043339-eef10568384e, fixed in 0.0.0-20260721043339-eef10568384e. Check your lockfile, including transitive dependencies.

What it is

SiYuan before v3.7.3 contains a SQL injection vulnerability in the /api/filetree/searchDocs endpoint, where the caller-supplied keyword parameter is concatenated directly into SQL statements with no escaping or parameter binding. The endpoint is reachable by a publish RoleReader token, or unauthenticated when publish mode is enabled with Publish.Auth.Enable set to false. Because the statement executes on a read-write SQLite handle via a driver that supports stacked (semicolon-separated) statements, an attacker can read and modify database content across all cleartext (non-encrypted) notebooks on the instance.

From the GitHub advisory

Summary

The /api/filetree/searchDocs endpoint concatenates the caller-supplied search keyword directly into a SQL statement with no escaping and no parameter binding. The endpoint is gated by CheckAuth only reachable by the publish RoleReader token, and by the anonymous account when Publish.Auth.Enable is false. The resulting statement runs on a read-write SQLite handle through a driver that executes stacked (;-separated) statements, against the global blocks table spanning all cleartext notebooks. An unauthenticated request can therefore read and write database content across every non-encrypted notebook on the instance.

Details

Data flow, unescaped and unbound at every hop:

- searchDocs (kernel/api/filetree.go): k := arg["k"].(string) passed straight to model.SearchDocs(k, …), no sanitization. - SearchDocs (kernel/model/file.go): after TrimSpace and strings.Fields, each token is spliced into a single-quoted LIKE literal by concatenation condition.WriteString("(hpath LIKE '%" + k + "%'"). No escaping, no '' doubling, no bind placeholder. - NAMFilter (kernel/conf/search.go): appends " OR name LIKE '%" + keyword + "%'" (and alias, memo) the same way, enabled by default. - QueryRootBlockByCondition (kernel/sql/blockquery.go): "SELECT , … FROM blocks WHERE type = 'd' AND " + condition + " ORDER BY … LIMIT …" passed to query(sqlStmt).

Weakness type: CWE-89.

Product: github.com/siyuan-note/siyuan/kernel (Go) · Assigned by: VulnCheck · Published: 2026-08-03

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Gogithub.com/siyuan-note/siyuan/kernel< 0.0.0-20260721043339-eef10568384e0.0.0-20260721043339-eef10568384e
VendorProductAffected versions (per CVE record)
siyuan-notesiyuan< 3.7.3

Severity scores

Scored byCVSSScoreVector
VulnCheck4.09.9 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
VulnCheck3.110 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
GitHub3.110.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 1.49% probability of exploitation activity in the next 30 days; percentile 74.

Timeline

  • — CVE record published by VulnCheck
  • — CVE record last updated
  • — GitHub-reviewed advisory GHSA-33jq-p8c2-q3q4 published (critical)

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vendor and project advisories, patches

  1. GitHub Security Advisory (GHSA-33jq-p8c2-q3q4) github.com

Vulnerability records

  1. GitHub Advisory GHSA-33jq-p8c2-q3q4 github.com
  2. CVE.org record CVE-2026-69085 cve.org
  3. NVD entry CVE-2026-69085 nvd.nist.gov

Other references from the CVE record and advisory

  1. VulnCheck Advisory: SiYuan before v3.7.3 SQL Injection via searchDocs vulncheck.com
  2. github.com github.com

Critical Go advisories · Today’s Security Digest