/

CVE-2026-130680

Severity:

CRITICAL RISK

(9.6)

Stored XSS (CWE-79) in SiYuan AttributeView Renderers

CVE-2026-130680

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Potential host command execution through the Electron desktop client

Severity:

CRITICAL RISK

(9.6)

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 Gallery and Kanban AttributeView rendering, where checkbox column names may be inserted into HTML without proper escaping. If a user opens a crafted document in the Electron desktop client with Node integration enabled, the injected content may execute Node.js code and host operating system commands.

Affected context

The issue affects SiYuan versions from 3.3.0 to before 3.8.10. It occurs when Gallery or Kanban AttributeView renderers display checkbox column names without escaping them as HTML. Risk is heightened when a crafted .sy.zip document is opened in the Electron desktop client with Node integration enabled.

Exploit preconditions

  • Attack surface: Rendering imported or shared SiYuan documents in Gallery or Kanban AttributeViews
  • Required access: An attacker must be able to provide a crafted document to a user; the user must open or render it
  • Trigger point: Rendering a checkbox column name in an affected AttributeView
  • Why exploitation is possible: Unescaped content can be interpreted as HTML, and Node integration in the desktop client may expose Node.js capabilities to injected script

Why this happens

The underlying bug is improper neutralization of user-controlled data in HTML output, corresponding to CWE-79: Cross-Site Scripting. The renderers treat checkbox column names as trusted content rather than applying context-appropriate output encoding. In an Electron environment with Node integration enabled, the consequences of script execution may extend beyond the application UI.

Potential impact

  • Injected script may execute when the crafted document is rendered
  • In the affected desktop-client configuration, code may access Node.js capabilities
  • Host operating system commands could be run with the privileges of the SiYuan process
  • Local data or the application environment could be exposed or modified

General mitigation guidance

Defensive patterns include:

  • Apply context-appropriate HTML escaping to all user-controlled values before rendering
  • Prefer safe templating or DOM APIs that treat values as text rather than markup
  • Disable Node integration for content that may include untrusted HTML, and use Electron isolation and sandboxing controls
  • Treat imported and shared documents as untrusted; validate or constrain their content before rendering
  • Limit the privileges available to the desktop application and its process

How teams detect issues like this

  • Use static analysis to identify user-controlled values flowing into HTML rendering without context-appropriate encoding
  • Review Gallery and Kanban rendering paths, especially handling of column names and imported document content
  • Add tests that verify special characters in attribute names are rendered as text, not interpreted as markup
  • Enforce policies that restrict Node integration and require secure Electron isolation settings
  • Automated code review tools may help identify unsafe HTML sinks and missing output encoding

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-g275-mf26-qx9r

Frequently asked

questions

The vulnerability is triggered when a crafted document is rendered. An attacker may deliver the document through a sharing or distribution channel, but user interaction to open or render it is generally required.

The attacker needs a way to provide a crafted document to a SiYuan user. The vulnerable rendering occurs when checkbox column names are displayed in an affected Gallery or Kanban AttributeView.

Escape user-controlled values for the HTML context, use APIs that render values as text, and avoid exposing Node.js capabilities to rendered content.

Treat imported documents as untrusted, test rendering paths for unsafe HTML interpretation, and enforce secure Electron isolation and privilege policies.

Find out what's already
exploitable in your codebase.