/

CVE-2026-100643

Severity:

HIGH RISK

(8.0)

Stored XSS (CWE-79) in SiYuan Attribute View Fields

CVE-2026-100643

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored JavaScript Execution and Potential 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

SiYuan contains a stored cross-site scripting vulnerability in several Attribute View values that are rendered without adequate escaping. An authenticated attacker who can modify affected descriptions or templates may cause JavaScript to execute when another user opens the impacted database interface; in the Electron desktop application, this may extend to command execution when Node integration is enabled.

Affected context

The issue can occur in SiYuan deployments where authenticated users can edit Attribute View field descriptions, template sources, select option descriptions, or footer calculation templates, and those values are later inserted into textarea elements without sufficient contextual escaping. Risk is greater in the Electron desktop application when Node integration exposes additional process capabilities.

Exploit preconditions

  • Attack surface: SiYuan database menus and Attribute View interfaces - Required access: An authenticated account with permission to modify

affected field or template values

  • Trigger point: Another user opens a database menu containing the stored

value

  • Execution context: The injected content is interpreted by the affected

interface rather than rendered strictly as text

  • Elevated consequence: In the Electron application, Node integration must

be enabled for browser-script execution to potentially reach operating

system command capabilities

Why this happens

The underlying bug is a failure to apply context-appropriate output encoding when storing and rendering attacker-influenced Attribute View values inside textarea elements. This permits markup or script content to cross the intended data-to-code boundary and execute in a user's browser context, corresponding to CWE-79, Improper Neutralization of Input During Web Page Generation. The risk is amplified when the desktop runtime exposes Node integration to renderer processes.

Potential impact

  • Stored JavaScript may execute in the context of users viewing affected database menus.
  • An attacker could potentially perform actions available to the victim's SiYuan session.
  • Session information or accessible application data could be exposed.
  • The Electron application may permit command execution with SiYuan process privileges when Node integration is enabled.
  • Malicious content could affect the integrity of shared database views and templates.

General mitigation guidance

Mitigation generally centers on treating all user-controlled Attribute View values as untrusted and applying context-aware output encoding at every rendering boundary. Secure-by-default designs should render descriptions and template metadata as inert text unless a narrowly defined, sanitized markup feature is required. Where markup is supported, allowlisting and sanitization should be applied before rendering, while template execution should be isolated from ordinary display fields. Electron deployments should minimize renderer privileges, avoid Node integration where it is not required, and apply least-privilege operating-system permissions. Access controls can also reduce which users may modify shared view definitions.

How teams detect issues like this

Detection can include static analysis for direct insertion of untrusted Attribute View values into HTML or DOM sinks, especially textarea and template-rendering paths. Code review should examine every field that accepts descriptions, template sources, option metadata, or calculated footer content, and verify contextual encoding at output time. Dynamic testing can use benign marker strings to confirm that stored values remain text in all affected interfaces. Policy enforcement may require output encoding libraries, sanitizer allowlists, and Electron configurations that prohibit unnecessary Node integration. Automated security review tools can help identify dangerous DOM sinks and missing escaping.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-h3p6-c22r-fx2j
vulncheck.comvulncheck.com/advisories/siyuan-before-3.8.4-stored-xss-via-attribute-view-textarea

Frequently asked

questions

An attacker generally needs an authenticated account with permission to modify

one of the affected Attribute View descriptions or templates. The stored

content is triggered when another user opens the relevant database menu.

No. The primary issue is stored JavaScript execution. Command execution is a

potential consequence in the Electron desktop application when Node

integration is enabled and the renderer can access those capabilities.

Treat all editable view values as untrusted, apply context-aware output

encoding, and sanitize any intentionally supported markup with a narrow

allowlist. Avoid exposing privileged desktop APIs to renderer content.

Use secure-by-default rendering, review every user-controlled value-to-DOM

path, restrict template privileges, apply least privilege, and include stored

XSS tests in code review and automated security checks.

Find out what's already
exploitable in your codebase.