Skip to main content

Kernel: Duplicate Advisory: SQL injection in backlink/mention search via unescaped stored and client input (publish mode): first-order (client keyword) and second-order (stored document title)…

0
Critical
Published: 08/14/2026 (08/14/2026, 12:31:24 UTC)
Source: GCVE Database
Product: github.com/siyuan-note/siyuan/kernel

Description

SiYuan versions up to and including v3.7.2 have a critical SQL injection vulnerability in the backlink/mention search functionality. The vulnerability arises because stored block metadata and client-supplied keywords are concatenated into a SQL MATCH/search statement with insufficient escaping, allowing single quotes to break out of string literals. This enables an attacker to execute arbitrary SQL commands on the main read-write database handle, potentially reading and writing across notebooks. The issue is fixed in version v3.7.4.

CVSS v3.1

Score 10.0critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

Affected software

Goghsa
github.com/siyuan-note/siyuan/kernel

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 13:37:23 UTC

Technical Analysis

SiYuan versions <= v3.7.2 contain a SQL injection vulnerability in the backlink/mention search query (kernel/model/backlink.go). The query concatenates stored block metadata (title, name, alias, anchor text) and client-supplied keywords into a SQL MATCH/search statement, escaping only double quotes but not single quotes. This improper sanitization allows single quotes in client input (first-order injection) or stored document metadata (second-order injection) to break out of string literals. Because the query runs on the main read-write siyuan.db handle via a statement-stacking-capable driver, an attacker can execute arbitrary SQL commands, enabling cross-notebook read and write access. The vulnerability is fixed in version v3.7.4.

Potential Impact

An unauthenticated attacker or a user with RoleReader privileges on the publish surface can exploit this vulnerability to execute arbitrary SQL commands on the main database. This can lead to unauthorized reading and modification of data across notebooks, compromising confidentiality and integrity. The vulnerability has a CVSS 3.1 score of 10.0 (critical), indicating high impact with network attack vector, no privileges required, no user interaction, and scope change.

Mitigation Recommendations

Upgrade to SiYuan version v3.7.4 or later, where this SQL injection vulnerability has been fixed. No other mitigations are indicated. Patch status is confirmed fixed in v3.7.4.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-p8cp-78hp-wmq8
Osv Schema Version
1.4.0
Ecosystems
["Go"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a9ad50bacd9273b49b67cae

Added to database: 09/04/2026, 14:26:19 UTC

Last enriched: 09/07/2026, 13:37:23 UTC

Last updated: 10/04/2026, 04:07:57 UTC

Views: 22

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses