/

CVE-2026-130679

Severity:

CRITICAL RISK

(9.0)

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

CVE-2026-130679

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Script execution in the desktop app, potentially leading to OS command execution

Severity:

CRITICAL RISK

(9.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 has a stored cross-site scripting vulnerability in Attribute View rendering that can occur when an attacker can save asset values containing markup interpreted as HTML. When a victim opens the affected note or row attribute panel in the desktop app, the injected script may execute and, in that environment, run OS commands through Node.js.

Affected context

The issue occurs in genAVValueHTML() when Attribute View asset values are rendered into an image src attribute without adequate escaping. It affects SiYuan builds before 3.8.10 when an attacker can store a crafted asset value and a victim later opens the associated note or row attribute panel in the desktop app.

Exploit preconditions

  • Attack surface: Attribute View asset-value rendering in the SiYuan desktop app
  • Required access: Ability to store or modify an Attribute View asset value
  • Trigger point: A victim opens the bound note or row attribute panel
  • Why exploitation is possible: Unescaped data is inserted into an HTML attribute, allowing browser-interpreted script execution; the desktop app's Node.js capabilities may enable OS command execution

Why this happens

The rendering logic places an asset value into an HTML image attribute without correctly encoding it for that context. This allows stored input to alter the resulting markup and cause script execution when the HTML is rendered. The behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation.

Potential impact

  • Injected script may execute when a victim views the affected panel
  • In the desktop app environment, script execution could lead to OS command execution
  • An attacker may gain access to data or actions available to the victim or application process
  • The incident could affect other notes or workflows accessible to the compromised app

General mitigation guidance

Mitigations generally focus on treating stored values as untrusted and preventing them from changing the structure of generated HTML.

Common defensive patterns include:

  • Applying context-appropriate output encoding to values inserted into HTML attributes
  • Using safe DOM APIs or templating that escapes values by default instead of assembling HTML strings
  • Validating asset URLs against a narrow set of acceptable formats and schemes
  • Limiting desktop renderer privileges and isolating web content from Node.js capabilities
  • Applying least privilege to the application process and restricting access to sensitive operating-system resources

How teams detect issues like this

  • Use static analysis to identify dynamic values concatenated into HTML or attribute strings without contextual encoding.
  • Review rendering code for untrusted stored data passed to HTML-generation helpers, especially in image and URL attributes.
  • Add tests that verify special characters in stored values remain data rather than altering rendered markup.
  • Enforce secure rendering and desktop-process isolation policies through code review and CI checks; automated review tools may help flag risky patterns.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/commit/3f4a2ca741411ebf0908ef1b7b86500a4ef4c20c
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-3qqh-fmrp-8vfq

Frequently asked

questions

The issue requires a stored Attribute View asset value and a victim opening the associated note or row attribute panel in the desktop app.

An attacker must be able to store or modify the relevant asset value. The victim must then view the affected panel.

Encode untrusted values for the exact HTML context in which they are rendered, or use safe DOM and templating APIs that prevent input from changing markup structure.

Treat stored content as untrusted, validate URL inputs, test rendering boundaries, and isolate desktop web content from privileged Node.js capabilities.

Find out what's already
exploitable in your codebase.