# CVE-2026-72811: SiYuan backlink search SQL injection via unescaped metadata concatenation

Source: https://junglewise.ai/threats/cve-2026-72811-siyuan-backlink-search-sql-injection-via-unescaped-metadata  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-72811 · Severity: critical · CVSS 10 · Published 2026-09-03

SiYuan is a note-taking and personal knowledge management system that allows users to organize and link documents. The backlink/mention search feature improperly concatenates user input and stored document titles into SQL queries without proper escaping, allowing attackers to inject arbitrary SQL commands. An anonymous user on a publicly shared instance (with publish mode enabled and authentication disabled) can read data from other notebooks, modify data, or attach external databases. Malicious document titles can also trigger the same injection when accessed by other users who have imported the document.

Technologies: [github.com/siyuan-note/siyuan/kernel (Go)](https://junglewise.ai/threats/technologies/github-com-siyuan-note-siyuan-kernel), [SiYuan](https://junglewise.ai/threats/technologies/siyuan). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [SiYuan](https://junglewise.ai/threats/vendors/siyuan).

## Quick answers

**Is CVE-2026-72811 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-72811 being exploited in the wild.

**How severe is CVE-2026-72811?** Critical severity, with a CVSS score of 10, published 3 September 2026.

**Which products and versions are affected?** github.com/siyuan-note/siyuan/kernel (Go) < 0.0.0-20260723004839-1a5b3431d5ab, SEMVER:introduced=0,fixed=0.0.0-20260723004839-1a5b3431d5ab; SiYuan before 0.0.0-20260723004839-1a5b3431d5ab.

**Is there a fix for CVE-2026-72811?** Yes. github.com/siyuan-note/siyuan/kernel (Go): upgrade to 0.0.0-20260723004839-1a5b3431d5ab or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-72811 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-72811?** Check whether you run github.com/siyuan-note/siyuan/kernel (Go) or SiYuan at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/siyuan-note/siyuan/kernel (Go): upgrade to 0.0.0-20260723004839-1a5b3431d5ab or later

  ```sh
  go get github.com/siyuan-note/siyuan/kernel@v0.0.0-20260723004839-1a5b3431d5ab
  ```


## Technical details

The vulnerability is a SQL injection in the backlink/mention search query (kernel/model/backlink.go, line ~980) where stored block metadata (title, name, alias, anchor text) and client-supplied keywords are concatenated into a SQL MATCH statement. The code escapes only double-quote characters but not single quotes, allowing single-quote characters to break out of string literals and inject SQL context. The vulnerable query executes on the main read-write siyuan.db handle via a statement-stacking-capable SQLite driver (88250/go-sqlite3 fork), enabling arbitrary SQL read/write operations across notebooks. Two attack vectors exist: (1) first-order injection via a client-supplied keyword containing single quotes, reachable by anonymous readers in publish mode with auth disabled; (2) second-order injection via malicious document titles stored safely through parameterized INSERTs but executed when concatenated into backlink queries on any kernel that ingests the document. The backlink query functions (getBacklink, getBacklink2, getBacklinkDoc, getBackmentionDoc) use CheckAuth-only protection, making the first-order vector accessible to RoleReader tokens and anonymous accounts. Parameterized queries or consistent single-quote escaping at the query-construction site is required to remediate both vectors.

## Affected products

- SiYuan SiYuan before 0.0.0-20260723004839-1a5b3431d5ab

## Identifiers

- CVE-2026-72811
- GHSA-q2vg-7qgx-x5fc
- GO-2026-6402

## Timeline

- 2026-09-03: disclosed: GitHub Advisory Database and CVE-2026-72811 published
- 2026-07-23: patched: Fix available in commit 1a5b3431d5ab

## References

- [https://api.github.com/users/Shirshakhtml](https://api.github.com/users/Shirshakhtml)
- [https://github.com/Shirshakhtml](https://github.com/Shirshakhtml)
- [https://api.github.com/users/Shirshakhtml/gists%7B/gist_id%7D](https://api.github.com/users/Shirshakhtml/gists%7B/gist_id%7D)
- [https://api.github.com/users/Shirshakhtml/repos](https://api.github.com/users/Shirshakhtml/repos)
- [https://avatars.githubusercontent.com/u/75179984?v=4](https://avatars.githubusercontent.com/u/75179984?v=4)
- [https://api.github.com/users/Shirshakhtml/events%7B/privacy%7D](https://api.github.com/users/Shirshakhtml/events%7B/privacy%7D)

## Related threats

- [SiYuan path traversal in web fetch](https://junglewise.ai/threats/cve-2026-126776-siyuan-3-7-0-before-3-8-10-on-windows-contains-a-path-traversal)
- [SiYuan publish filter information disclosure in local storage](https://junglewise.ai/threats/go-2026-6836-siyuan-the-publish-filter-for-local-storage-returns-the-7f022e62)
- [SiYuan path traversal via GLOBALROOT alias bypass](https://junglewise.ai/threats/cve-2026-118680-siyuan-3-8-7-through-3-8-8-fails-to-normalize-windows-globalroot)
- [SiYuan SQL injection in history search](https://junglewise.ai/threats/cve-2026-116170-siyuan-before-v3-8-7-contains-an-sql-injection-vulnerability)
- [SiYuan cross-site scripting in /check-auth redirect](https://junglewise.ai/threats/cve-2026-116167-siyuan-from-2-9-0-before-3-8-7-contains-a-cross-site-scripting)
