/

CVE-2026-130681

Severity:

CRITICAL RISK

(9.0)

Stored XSS (CWE-79) in SiYuan Attribute View Header UI

CVE-2026-130681

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored script execution with potential OS command execution in the desktop application context

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 contains a stored cross-site scripting flaw in the Attribute View header: a persisted view name is inserted into the panel without proper escaping. When a desktop user opens the panel, the injected script may run in the application context and, where Node.js access is available, could execute OS commands.

Affected context

The issue affects SiYuan versions before 3.8.10 in the row attribute panel rendering path. It occurs when renderAVAttribute() displays an Attribute View name without escaping it; an attacker must be able to persist a crafted name, for example through the setAttrViewName action, and a desktop user must open the affected panel for the script to run. This is described as an incomplete fix for CVE-2026-44670.

Exploit preconditions

  • Attack surface: Attribute View name rendering in the database row attribute panel
  • Required access: Ability to persist or change an Attribute View name, such as through the relevant action
  • Trigger point: A desktop user opens the panel displaying the crafted name
  • Why exploitation is possible: The name is inserted into rendered content without adequate output escaping; Node.js access in the desktop context may expose OS command execution capabilities

Why this happens

The rendering code treats a persisted Attribute View name as trusted content rather than untrusted text. Failing to apply context-appropriate output encoding can cause the browser or embedded web view to interpret the value as active markup or script, which maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The reported incomplete fix indicates that a related rendering path remained unsafe.

Potential impact

  • Injected script may run when a user opens the affected panel
  • Attacker-controlled actions may be performed in the application context
  • If Node.js access is available to the rendered content, OS commands may be executed with the desktop user's privileges
  • Local data or application integrity could be affected

General mitigation guidance

Defensive measures generally focus on treating persisted names as untrusted data at every rendering boundary.

  • Apply context-appropriate output encoding when inserting names into UI content
  • Prefer text-only rendering APIs over HTML interpretation for user-controlled values
  • Validate names against the intended format without relying on validation as a substitute for output encoding
  • Keep the desktop rendering context isolated from Node.js and other privileged capabilities unless strictly required
  • Apply least privilege to the desktop process and limit access to sensitive local resources
  • Review related rendering paths to ensure fixes cover all places where the same data is displayed

How teams detect issues like this

  • Use static analysis to identify untrusted values flowing into HTML or web-view rendering sinks without context-aware encoding
  • Review code that renders Attribute View names and other persisted labels, including alternate or legacy rendering paths
  • Add tests that verify special characters in stored names are displayed as text rather than interpreted as markup
  • Enforce code review or CI policies requiring safe rendering APIs and restricted desktop web-view privileges
  • Consider automated security review tools to flag unsafe data flows and privileged renderer configurations

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/commit/d3af9d5782082b379d45a69eedf4ebcfe8ba6889
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-7gj8-xf7w-hfjf

Frequently asked

questions

Exploitation requires the ability to persist a crafted Attribute View name and a desktop user to open the panel that renders it.

Not necessarily. The relevant name must be attacker-controlled and displayed in the affected panel; the risk depends on how the data is introduced and who can access it.

Render names as text using context-aware escaping, and avoid interpreting user-controlled values as HTML or script.

Treat persisted content as untrusted at every output boundary, test rendering paths with adversarial input, and isolate desktop UI content from Node.js or other privileged APIs.

Find out what's already
exploitable in your codebase.