Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Attacker must publish a marketplace package (PR:L) and victim must browse it (UI:R); renderer XSS escaping into OS command execution justifies S:C with full C:H/I:H/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
SiYuan is an open-source personal knowledge management system. Prior to 3.7.0, it does not escape the untrusted fields (name, version, author, description) when they are serialized into the data-obj HTML attribute of each marketplace card. Because the attribute is single-quoted and the value is produced with JSON.stringify() (which does not escape ', <, or >), a package whose name contains a single quote breaks out of the attribute and injects arbitrary HTML. In the desktop client the main BrowserWindow runs with nodeIntegration: true, contextIsolation: false, so the injected markup escalates from DOM XSS to arbitrary OS command execution. This is the same root cause and same impact as the original advisory, reached through a sibling sink the patch did not cover. This vulnerability is fixed in 3.7.0.
AnalysisAI
Stored cross-site scripting leading to OS command execution in SiYuan, an open-source personal knowledge management system, affects all desktop client versions prior to 3.7.0. Untrusted marketplace package metadata (name, version, author, description) is serialized via JSON.stringify() into a single-quoted data-obj HTML attribute without escaping single quotes or angle brackets, so a package name containing a single quote breaks out of the attribute and injects arbitrary HTML; because the Electron BrowserWindow runs with nodeIntegration:true and contextIsolation:false, the DOM XSS escalates to arbitrary command execution on the host. No public exploit identified at time of analysis, but the GitHub Security Advisory (GHSA-x88j-wgpr-h22x) notes this is the same root cause and impact as a prior advisory, reached through a sibling sink the earlier patch missed.
Technical ContextAI
The vulnerability lives in SiYuan's marketplace UI, which renders package cards by embedding package metadata into a data-obj HTML attribute. The values are produced with JavaScript's JSON.stringify(), which correctly escapes characters like double-quotes and backslashes for JSON but does NOT escape the single-quote ('), less-than (<), or greater-than (>) characters that are significant in single-quoted HTML attribute contexts. This is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) where a JSON-encoding routine is incorrectly used as an HTML-attribute-encoding routine. The CPE cpe:2.3:a:siyuan-note:siyuan identifies the affected product. SiYuan's desktop client is built on Electron; with nodeIntegration:true and contextIsolation:false the renderer process has direct access to Node.js APIs (e.g. child_process), so any script injected into the DOM can invoke OS-level commands - the reason a content-injection bug becomes remote code execution rather than browser-confined XSS.
RemediationAI
Vendor-released patch: 3.7.0 - upgrade all SiYuan desktop clients to 3.7.0 or later, which adds proper escaping of the untrusted marketplace fields before they reach the data-obj attribute (see https://github.com/siyuan-note/siyuan/security/advisories/GHSA-x88j-wgpr-h22x). Until upgrading, avoid opening or browsing the package marketplace within the desktop client, since the injection triggers when a malicious card is rendered; this trades away marketplace functionality but removes the trigger. As a deeper compensating control for environments that cannot patch immediately, run the client in a sandboxed/least-privilege OS account so that any resulting command execution is contained, accepting the inconvenience of restricted local privileges. Hardening the Electron configuration (contextIsolation:true / nodeIntegration:false) is the long-term structural mitigation but is not user-configurable in a packaged release and effectively requires the vendor fix.
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
Reflected XSS in SiYuan knowledge management before 3.5.9.
SiYuan knowledge management system prior to 3.5.5 has a path traversal in /api/file/copyFile allowing arbitrary file ope
SiYuan version 3.0.3 allows executing arbitrary commands on the server. Rated critical severity (CVSS 9.0), this vulnera
SQL injection in SiYuan prior to version 3.6.0 allows any authenticated user, including those with read-only access, to
Cross-site scripting (XSS) in SiYuan personal knowledge management system versions 3.6.0-3.6.1 allows remote attackers t
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-39102