/

CVE-2026-130682

Severity:

CRITICAL RISK

(9.6)

Stored XSS (CWE-94) in SiYuan Table Caption Import

CVE-2026-130682

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-94

Impact:

Remote Code Execution

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 can persist a table caption into its IAL properties without sanitizing it, allowing attacker-controlled content to become stored cross-site scripting when imported or synchronized. If the caption is rendered in the Electron client with Node integration enabled, script execution may escalate to remote code execution in the client context.

Affected context

The issue affects SiYuan deployments before 3.8.10 when table captions are persisted into IAL properties without adequate HTML sanitization. Risk arises when crafted content is imported or synchronized and then rendered by the Electron client; the described impact depends in part on the client's Node integration context.

Exploit preconditions

  • Attack surface: Imported or synchronized document content containing a table caption
  • Required access: Ability to provide or influence content that reaches a victim's SiYuan client
  • Trigger point: Import or sync followed by rendering the affected caption
  • Why exploitation is possible: The caption is persisted without HTML sanitization, and its event-handler content may execute in the Electron client context

Why this happens

The application persists attacker-influenced caption data into IAL properties without applying context-appropriate HTML sanitization or encoding. When that data is later rendered as active markup, it can trigger stored cross-site scripting, corresponding to CWE-94. In an Electron environment with Node integration enabled, script execution may have access to capabilities beyond those available to ordinary browser content.

Potential impact

  • Script execution in the SiYuan client when affected content is rendered
  • Remote code execution with the privileges available to the Electron process
  • Exposure or modification of data accessible to the client
  • Further compromise of the user's environment, depending on client permissions and configuration

General mitigation guidance

Defensive patterns focus on treating imported and synchronized content as untrusted:

  • Sanitize or contextually encode caption data before persistence and rendering
  • Prefer safe text-rendering APIs over interpreting user-controlled values as HTML
  • Disable Electron Node integration for rendered content where possible, and use context isolation and sandboxing
  • Apply restrictive Content Security Policy and minimize renderer privileges
  • Validate content against a strict schema while recognizing that validation alone does not replace output encoding

How teams detect issues like this

  • Use static analysis to identify unsanitized data flows from imported or synchronized captions into HTML-rendering sinks
  • Review code that writes IAL properties and code that renders those properties in the Electron client
  • Enforce policies that restrict unsafe HTML APIs and unnecessary Node integration in renderer processes
  • Add security tests for encoded or otherwise unusual caption content across import, sync, persistence, and rendering paths
  • Automated code review tools may help identify risky data flows and renderer configurations

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-v92g-4rrc-c6wv

Frequently asked

questions

The described trigger is import or synchronization of crafted content. An attacker would need a way to make that content reach a victim's client; the description does not establish that every deployment exposes a direct remote attack path.

They need to influence content that the victim imports or receives through sync. The victim's client must then render the affected caption.

Treat captions as untrusted data, sanitize or contextually encode them, and render them as text rather than active HTML. Reduce the impact of renderer compromise by limiting Electron capabilities.

Apply consistent output encoding at rendering boundaries, test content-ingestion flows, and use least-privilege Electron settings such as disabled Node integration, context isolation, and sandboxing.

Find out what's already
exploitable in your codebase.