/

CVE-2026-93922

Severity:

HIGH RISK

(8.8)

Stored XSS (CWE-79) in SiYuan Daily Note Picker Dialog

CVE-2026-93922

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Potential OS Command Execution

Severity:

HIGH RISK

(8.8)

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 renders notebook names as unescaped HTML in the Daily Note picker, allowing stored cross-site scripting in the Electron renderer. If an attacker can create or modify a notebook name and a user opens the picker, the injected script may execute with access to Node.js capabilities and could run operating system commands.

Affected context

The vulnerability occurs in SiYuan's Electron-based Daily Note picker when notebook names are inserted into the user interface as raw HTML rather than safely encoded text. Exploitation depends on an attacker being able to create or alter notebook metadata and on a victim opening the affected picker dialog in a renderer with privileged Node.js integration.

Exploit preconditions

  • Attack surface: SiYuan's Electron renderer and Daily Note picker dialog
  • Required access: Ability to create or modify a notebook name that is later displayed
  • Trigger point: Opening the Daily Note picker containing the affected notebook
  • Why exploitation is possible: Notebook names are rendered as HTML without context-appropriate escaping, allowing stored script content to execute in the renderer

Why this happens

The underlying flaw is improper output encoding of attacker-influenced notebook names before they are inserted into an HTML-rendering context. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting. In an Electron application, the impact can be amplified when the renderer exposes privileged Node.js functionality to page scripts.

Potential impact

  • Arbitrary JavaScript may execute in the Electron renderer
  • Operating system commands could be launched through available Node.js capabilities
  • Local files or application data may be accessed or modified
  • Application integrity and user confidentiality could be compromised
  • Affected workspaces or connected data could be altered

General mitigation guidance

Mitigation generally focuses on treating notebook names and other metadata as untrusted display content.

Common defensive patterns include:

  • Apply context-appropriate HTML escaping or render names through text-only APIs
  • Prefer secure-by-default Electron isolation, including strong context isolation and disabled Node.js access for untrusted renderer content
  • Use a narrowly scoped, explicit bridge for required application functions rather than exposing general operating system capabilities
  • Validate and constrain notebook metadata at trust boundaries without relying on validation as a substitute for output encoding
  • Run the application with least-privilege operating-system permissions
  • Apply a restrictive content security policy where compatible with application functionality

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying direct insertion of notebook or user-controlled values into HTML
  • Code review checks for unsafe DOM APIs, template interpolation, and missing output encoding
  • Electron configuration reviews covering Node.js integration, context isolation, sandboxing, and preload bridges
  • Tests that display special-character and markup-like metadata values in every renderer view
  • Policy enforcement requiring safe DOM rendering patterns and security review for privileged renderer capabilities
  • Neutral automated review tools that flag unescaped data flow into HTML sinks

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan
github.comgithub.com/siyuan-note/siyuan/blob/v3.8.4/app/src/util/mount.ts#L72
github.comgithub.com/siyuan-note/siyuan/blob/v3.8.4/kernel/model/file.go#L2446-L2454
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-8c2m-33v9-vvqm
vulncheck.comvulncheck.com/advisories/siyuan-through-3.8.4-stored-xss-via-notebook-names

Frequently asked

questions

Exploitation is generally dependent on how notebook metadata is synchronized or shared. An attacker must get crafted notebook-name data into a workspace, and a user must open the affected picker.

It requires whatever access is needed to create or modify notebook names. In shared or synchronized environments, that may include an account or another path to alter workspace content.

Treat notebook names as plain text and apply context-appropriate output encoding before rendering them. Privileged Electron capabilities should also be isolated behind a minimal, explicit interface.

Combine secure DOM-rendering patterns, Electron isolation, least-privilege execution, security-focused code review, and tests covering attacker-controlled metadata in every UI context.

Find out what's already
exploitable in your codebase.