Sceawere
Vulnerability Detail
CVE-2026-100641UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
SiYuan Cross-Site Scripting RCE
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 8
- Creation Date
- 2h ago
- Vendor
- siyuan-note
- Product
- siyuan
- Attack Type
- Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
SiYuan before v3.8.4 does not HTML-escape stored flashcard block content before interpolating it into the card-manager list markup. Block content returned by /api/riff/getRiffCards is inserted into a card item template in app/src/card/viewCards.ts and assigned to listElement.innerHTML, so content such as <img src=invalid onerror=...> becomes an executable event-handler attribute. Because the SiYuan desktop (Electron) main window is created with nodeIntegration enabled and contextIsolation disabled, an administrator who opens the card manager on a workspace containing attacker-supplied flashcard content (for example introduced through contribution or import) executes the attacker's script in a privileged renderer, which can lead to arbitrary code execution on the host. The affected endpoint remains behind authentication and administrator-role checks; this is an untrusted-content-to-privileged-renderer issue, not an authorization bypass.
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-09-26T14:16:46.080Z",
"pubdate": "2026-09-26T14:16:46.080Z",
"executiveSummary": "SiYuan versions prior to v3.8.4 are susceptible to a critical Cross-Site Scripting (XSS) vulnerability that leads to Remote Code Execution (RCE). The vulnerability stems from improper input sanitization of flashcard block content retrieved via the /api/riff/getRiffCards endpoint. Because the SiYuan Electron-based desktop application is configured with nodeIntegration enabled and contextIsolation disabled, the rendering of malicious HTML content within the card manager facilitates an escape from the sandbox.\nAn attacker capable of injecting malicious content into a flashcard (e.g., via workspace import or shared notes) can achieve full system compromise if an administrator views the corrupted card. While the vulnerability requires authentication and administrative privileges to trigger, it represents a high-risk vector for supply-chain or workspace-level attacks, as the elevated renderer context grants the attacker access to Node.js primitives, bypassing typical web-based security boundaries.",
"technicalDetails": "The vulnerability is a classic Stored XSS flaw occurring within the SiYuan flashcard management module. The root cause is the failure to perform HTML-escaping on flashcard block content before processing it within the application's DOM. Specifically, data returned from the /api/riff/getRiffCards API is directly interpolated into a template and assigned to a DOM element's innerHTML property within app/src/card/viewCards.ts.\nBecause innerHTML parses its input as HTML, an attacker can supply crafted payloads such as <img src=x onerror=alert(1)>, which the browser will execute upon rendering the card item. In standard web applications, this would be limited by the Same-Origin Policy and sandbox protections. However, SiYuan’s Electron configuration explicitly enables nodeIntegration and disables contextIsolation. This critical security misconfiguration provides the renderer process with direct access to the Node.js runtime and full system APIs.\nThe attack flow proceeds as follows: 1) The attacker injects a malicious payload into a flashcard block within a workspace. 2) An administrator or an authenticated user with administrative rights accesses the card manager. 3) The application requests card data from /api/riff/getRiffCards. 4) The client-side script receives the malicious string and assigns it to listElement.innerHTML. 5) The browser interprets the payload, executing the JavaScript defined in the tag's event handlers. 6) Because the process maintains high-privilege Node.js access, the script executes with the permissions of the local user running the application, allowing for arbitrary code execution, file system modification, or process manipulation.\nThis vulnerability is classified as an untrusted-content-to-privileged-renderer issue. While the exploit is constrained to the application's authenticated session, the administrative requirement is secondary to the severe impact of full host compromise. By leveraging the lack of context isolation, the attacker elevates a simple UI injection into a persistent, high-privilege execution chain that impacts the underlying operating system."
}