/

CVE-2026-130678

Severity:

CRITICAL RISK

(9.0)

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

CVE-2026-130678

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Script execution with potential desktop code 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 column names, which are rendered without proper escaping. If a victim adds or duplicates a malicious column in the desktop application, the injected script may run with Node.js privileges and could enable desktop code execution.

Affected context

The issue occurs when Attribute View column names containing attacker-controlled HTML are rendered in col.ts without escaping. Malicious names may be introduced through addAttributeViewKey, a .sy.zip import, or synchronization. Risk depends on a victim opening or interacting with the affected view in a vulnerable SiYuan desktop context.

Exploit preconditions

  • Attack surface: Attribute View column names and their rendering in the SiYuan application
  • Required access: Ability to introduce or synchronize a crafted column name, or otherwise provide a malicious .sy.zip import
  • Trigger point: A victim adds or duplicates the affected column
  • Why exploitation is possible: The column name is rendered as HTML without adequate escaping, allowing script execution; in the desktop context, the script may have Node.js privileges

Why this happens

This is a stored cross-site scripting flaw mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. Attacker-controlled column names are treated as markup rather than plain text when rendered, and insertion through insertAdjacentHTML allows embedded script to execute. The desktop application's Node.js privileges can increase the consequences beyond those of ordinary browser-based XSS.

Potential impact

  • Malicious script may execute when a victim adds or duplicates the affected column.
  • In the desktop context, script execution may enable access to Node.js capabilities.
  • An attacker could potentially execute code on the victim's machine or access data available to the application.
  • The issue could compromise the integrity or confidentiality of the user's SiYuan workspace.

General mitigation guidance

Defensive patterns include:

  • Render column names as text using safe DOM APIs rather than inserting them as HTML.
  • Apply context-appropriate output encoding and, where rich text is necessary, use a restrictive, well-maintained sanitizer.
  • Treat imported, synchronized, and otherwise externally supplied content as untrusted.
  • Minimize or isolate privileged Node.js capabilities from content-rendering contexts.
  • Use a restrictive content security policy as a defense-in-depth measure.

How teams detect issues like this

  • Use static analysis to identify unsafe HTML insertion APIs such as insertAdjacentHTML when their inputs may contain user-controlled values.
  • Review rendering paths for Attribute View names and trace whether imported, synchronized, or API-supplied values reach HTML sinks without encoding or sanitization.
  • Add tests that verify hostile markup is displayed as inert text across add, duplicate, import, and synchronization flows.
  • Apply code review and CI policies that flag unsafe DOM sinks and require approved rendering or sanitization patterns.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/commit/9c24c3ddd8ded505bdeb66d3f318820a77f932b3
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-vvqj-4crq-p53p

Frequently asked

questions

The described trigger is a victim adding or duplicating a malicious Attribute View column. In the desktop context, script execution may carry Node.js privileges.

An attacker needs a way to introduce or distribute a crafted column name, such as through the described API, import, or synchronization paths. The exact access requirements depend on how those features are exposed and controlled.

Treat column names as text and render them through safe DOM APIs. If HTML is required, apply strict context-aware sanitization and keep privileged capabilities isolated from rendered content.

Treat imported and synchronized content as untrusted, audit data flows into HTML sinks, and enforce automated checks and tests for safe rendering patterns.

Find out what's already
exploitable in your codebase.