Summary
CVE-2026-100645 is a stored cross-site scripting vulnerability in SiYuan's gallery and kanban database renderers, where field descriptions are inserted into aria-label attributes without adequate escaping. In the Electron desktop application with Node.js integration enabled, an attacker who can store crafted content may execute JavaScript and invoke operating-system commands with the user's privileges.
Affected context
The issue may occur in SiYuan deployments that:
- Render gallery or kanban database views
- Display attacker-influenced field descriptions in HTML attributes
- Use the Electron desktop application with nodeIntegration enabled
Risk depends on whether an attacker can create or modify stored database content and whether the affected renderer displays that content in a privileged application context.
Exploit preconditions
- Attack surface: Stored content rendered by gallery or kanban database views
- Required access: Ability to create or modify field descriptions, directly or through an integrated content source
- Trigger point: A victim opens a database view that renders the crafted description
- Privileged condition: The Electron application exposes Node.js integration to renderer JavaScript
- Why exploitation is possible: Unescaped attribute content can become executable browser script, and the privileged renderer may expose child_process functionality
Why this happens
The underlying bug is failure to contextually escape untrusted field descriptions before placing them in aria-label HTML attributes. This allows stored data to alter the interpretation of generated markup and execute script when the affected view is opened.
The issue maps to CWE-79, Improper Neutralization of Input During Web Page Generation, because application data is incorporated into HTML without adequate output encoding. Enabling Node.js integration in the renderer increases the consequence by allowing script execution to reach privileged desktop APIs.
Potential impact
- A malicious stored description may execute JavaScript in a victim's session
- The script could invoke Node.js child_process APIs when desktop integration is exposed
- Arbitrary commands could run with the privileges of the SiYuan user
- Local files, application data, or credentials may be exposed
- The compromise could enable persistence or further malware activity
General mitigation guidance
Mitigation generally focuses on treating all stored descriptions as untrusted and preserving strict separation between rendered content and privileged desktop capabilities.
Common defensive patterns include:
- Applying context-appropriate output encoding for HTML attributes
- Using safe DOM or templating APIs that do not interpret data as markup
- Enforcing allowlist-based sanitization where rich content is required
- Disabling Node.js integration and limiting renderer privileges by default
- Isolating untrusted content in a non-privileged context
- Running the application with the minimum operating-system permissions necessary
- Validating and constraining content at storage and rendering boundaries
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis rules identifying string interpolation into HTML attributes
- Code review checks for missing contextual escaping in gallery and kanban renderers
- Searches for renderer configurations that enable nodeIntegration or expose unrestricted preload APIs
- Dynamic tests using inert, identifiable markup markers in stored descriptions
- Content-security and desktop application policies that restrict script execution and child-process access
Automated security review tools may help identify unescaped template values and overly privileged Electron configurations, but findings should be validated against the actual rendering context.

