/

CVE-2026-100645

Severity:

HIGH RISK

(8.0)

Stored XSS (CWE-79) in SiYuan Gallery UI Renderers

CVE-2026-100645

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(8.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-556j-q8c8-qqg3
vulncheck.comvulncheck.com/advisories/siyuan-3.7.0-before-3.8.4-stored-xss-via-gallery-kanban

Frequently asked

questions

Exploitation is not necessarily remote by itself. It depends on whether an attacker can submit or modify stored field descriptions through a reachable synchronization service, collaboration feature, import path, or other content channel.

The attacker generally needs a way to place crafted content in a database field description. A victim must then open the affected gallery or kanban view for the stored script to execute.

Contextually encode field descriptions before inserting them into HTML attributes, use safe DOM construction APIs, and avoid exposing Node.js integration to untrusted renderer content.

Treat stored content as untrusted, enforce output-encoding rules in code review and CI, apply restrictive Electron security policies, and run the application with least-privilege operating-system permissions.

Find out what's already
exploitable in your codebase.