---
id: "CVE-2026-69085"
kind: "vulnerability"
aliases: ["CVE-2026-69085", "GHSA-33jq-p8c2-q3q4", "GO-2026-6621"]
title: "SiYuan: Unauthenticated SQL injection in searchDocs via unescaped keyword (publish mode): cross-notebook read/write with statement stacking in github.com/siyuan-note/siyuan/kernel"
severity: "critical"
cvss: 10.0
epss: 0.01488
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/siyuan-note/siyuan/kernel", "fixed": ["0.0.0-20260721043339-eef10568384e"], "affected": "< 0.0.0-20260721043339-eef10568384e", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["go", "package", "publish-mode", "self-hosted", "siyuan"]
not_affected_if: ["auth-required", "encrypted-notebooks-only", "managed-hosting", "publish-mode-disabled"]
published_at: "2026-08-03T14:16:28+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T21:43:40+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6621", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-69085", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-69085", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# SiYuan: Unauthenticated SQL injection in searchDocs via unescaped keyword (publish mode): cross-notebook read/write with statement stacking in github.com/siyuan-note/siyuan/kernel

SiYuan's kernel has an SQL injection in the /api/filetree/searchDocs endpoint: the keyword parameter is concatenated into SQL without escaping. An attacker can read and modify the database for every unencrypted notebook on the instance, and can do so without logging in when publish mode is on with Publish.Auth.Enable set to false.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/siyuan-note/siyuan/kernel affected < 0.0.0-20260721043339-eef10568384e fixed 0.0.0-20260721043339-eef10568384e

## How to check

Check whether publish mode is enabled and whether Publish.Auth.Enable is false in the SiYuan config.
Check the installed version of github.com/siyuan-note/siyuan/kernel against the fixed pseudo-version 0.0.0-20260721043339-eef10568384e.

## Fix

Upgrade SiYuan to v3.7.3 or later (kernel pseudo-version 0.0.0-20260721043339-eef10568384e or newer).
Enable publish auth (Publish.Auth.Enable true) and rotate any publish RoleReader tokens if you cannot upgrade right away.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6621
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-69085
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-69085

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
