Sceawere
Vulnerability Detail
CVE-2026-72807UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
SiYuan SQL Injection Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 8
- Creation Date
- 2h ago
- Vendor
- siyuan-note
- Product
- siyuan
- Attack Type
- Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
- Vector String
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
- Attack Complexity
- HIGH
Narrative and Response
Description
SiYuan versions before v3.7.4 contain a second-order SQL injection vulnerability in attribute-view template columns that expose the queryBlocks function, which executes raw SQL using string substitution instead of parameterized queries. Attackers can distribute malicious SiYuan documents or packages with crafted template columns that execute arbitrary SQL on a victim's kernel when the package is imported and rendered, enabling read and write access across notebooks.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "8.0",
"pubDate": "2026-08-12T20:17:52.837Z",
"pubdate": "2026-08-12T20:17:52.837Z",
"executiveSummary": "SiYuan versions prior to v3.7.4 contain a second-order SQL injection vulnerability residing within the attribute-view template columns that expose the queryBlocks function. The vulnerability stems from the direct execution of raw SQL queries via string substitution rather than utilizing secure parameterized queries. This security flaw introduces severe risk implications, allowing malicious actors to achieve arbitrary read and write access across all notebooks managed by the application. The primary attack vector involves the distribution of maliciously crafted SiYuan documents or packages containing specially designed template columns. Exploitation occurs when a victim imports and renders these untrusted packages on their local kernel. Consequently, an attacker can leverage this interaction to compromise the confidentiality, integrity, and availability of sensitive data stored within the affected systems without requiring prior authentication to the underlying database engine.",
"technicalDetails": "The vulnerability is classified as a second-order SQL injection flaw affecting the attribute-view template columns of SiYuan versions before v3.7.4. The vulnerable component is specifically the queryBlocks function, which improperly processes database interactions by constructing raw SQL commands through unsafe string substitution instead of adhering to parameterized query practices. Because the SQL execution relies on unvalidated input originating from stored document attributes, malicious payloads injected into template columns remain dormant until the specific data structure is parsed and evaluated.\nThe attack flow proceeds in several distinct steps. First, an attacker crafts a malicious SiYuan document or package embedding serialized SQL injection payloads within the attribute-view template columns. Second, the attacker distributes this malicious package through social engineering, public repositories, or direct file sharing. Third, the victim imports the malicious package into their local instance of SiYuan. Fourth, when the victim's kernel processes, renders, and evaluates the imported document, the attribute-view template columns trigger the vulnerable queryBlocks function. Fifth, the application evaluates the unsafe string substitution, executing the attacker-controlled raw SQL statements against the underlying database.\nRegarding requirements and exposure, the exploitation requires user interaction—specifically the import and rendering of an untrusted package. The affected component operates within the local kernel context, meaning the attack does not require direct network exposure to external remote attackers, but relies entirely on malicious file distribution. The post-exploitation impact is severe, granting the attacker arbitrary read and write access across all local notebooks, potentially enabling data exfiltration, database modification, or further manipulation of the application state."
}