Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/siyuan-note/siyuan/kernel
  4. ›
  5. CVE-2026-72811

CVE-2026-72811: SiYuan: SQL injection in backlink/mention search via unescaped stored and client input (publish mode): first-order (client keyword) and second-order (stored document title) breakout on read-write handle

September 3, 2026

The backlink/mention search query (kernel/model/backlink.go) concatenates stored block metadata (title, name, alias, anchor text) and the client-supplied keyword into a SQL MATCH/search statement, escaping only the double-quote character (") and not the single quote ('). A single quote in either the client keyword or in stored document metadata breaks out of the string literal. The query runs on the main read-write siyuan.db handle through a statement-stacking-capable driver.

This yields two vectors:

  • First-order: a client-supplied keyword containing ' injects directly. This path is reachable by an anonymous reader on the publish surface.
  • Second-order: a document whose title/name/alias contains ' is stored safely (indexing uses parameterized inserts) but detonates when that stored value is later concatenated into the backlink query including on another user’s kernel that has ingested the malicious document.

References

  • github.com/advisories/GHSA-q2vg-7qgx-x5fc
  • github.com/siyuan-note/siyuan/commit/1a5b3431d5ab3036b19c1cc79486fedd6906fb57
  • github.com/siyuan-note/siyuan/security/advisories/GHSA-q2vg-7qgx-x5fc
  • nvd.nist.gov/vuln/detail/CVE-2026-72811
  • www.vulncheck.com/advisories/siyuan-before-sql-injection-via-backlink-search

Code Behaviors & Features

Detect and mitigate CVE-2026-72811 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20260723004839-1a5b3431d5ab

Fixed versions

  • 0.0.0-20260723004839-1a5b3431d5ab

Solution

Upgrade to version 0.0.0-20260723004839-1a5b3431d5ab or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

go/github.com/siyuan-note/siyuan/kernel/CVE-2026-72811.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:22:00 +0000.