Duplicate Advisory: Second-order SSTI to arbitrary SQL via attribute-view template column (queryBlocks): malicious imported package executes SQL on victim kernel
Description
SiYuan versions before v3.7.4 contain a second-order SQL injection vulnerability in attribute-view template columns. This flaw allows execution of arbitrary SQL commands on the victim's kernel when a malicious package with crafted template columns is imported and rendered. The vulnerability arises because the queryBlocks function executes raw SQL using string substitution instead of parameterized queries. This enables attackers to gain read and write access across notebooks.
CVSS v3.1
Score 8.0high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SiYuan before version 3.7.4 has a second-order SQL injection vulnerability (CWE-89) in attribute-view template columns that expose the queryBlocks function. This function executes raw SQL via string substitution rather than using parameterized queries, allowing attackers to craft malicious documents or packages that execute arbitrary SQL on the victim's kernel upon import and rendering. This results in potential read and write access across notebooks within the application.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary SQL commands on the victim's kernel, leading to read and write access across notebooks. This compromises data confidentiality and integrity within the affected SiYuan environment. The vulnerability has a high severity score (CVSS 8.0) with network attack vector, high impact on confidentiality and integrity, and requires user interaction with high attack complexity.
Mitigation Recommendations
A fix is available in SiYuan version 3.7.4 and later. Users should upgrade to version 3.7.4 or newer to remediate this vulnerability. Since no official patch links are provided in the advisory, verify the upgrade availability and details from the official SiYuan project sources or vendor advisory before applying.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-2jmx-q9jf-wp3w
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a9ad505acd9273b49b67c15
Added to database: 09/04/2026, 14:26:13 UTC
Last enriched: 09/07/2026, 13:37:38 UTC
Last updated: 10/01/2026, 23:04:50 UTC
Views: 23
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.