/

CVE-2026-82653

Severity:

HIGH RISK

(8.9)

Stored XSS (CWE-79) in SiYuan confirmDialog Component

CVE-2026-82653

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution and Session Compromise

Severity:

HIGH RISK

(8.9)

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 vulnerability in confirmDialog() because package and notebook names are inserted into innerHTML without escaping. An attacker who can submit a malicious bazaar package or influence a notebook name may cause script content to execute in another user's browser when the affected dialog is displayed.

Affected context

The vulnerability occurs in SiYuan workflows that display package or notebook names through confirmation dialogs. It becomes risky when attacker-controlled names are stored and later rendered as HTML without context-appropriate output encoding, such as during package removal or encrypted-notebook unlocking.

Exploit preconditions

  • Attack surface: Web-based SiYuan user interface and confirmation dialogs
  • Required access: Ability to submit or cause storage of a package name or notebook name containing markup
  • Trigger point: A victim views the affected confirmation dialog, such as during package uninstallation or notebook unlocking
  • Why exploitation is possible: User-controlled values are interpolated into innerHTML without sufficient escaping or sanitization

Why this happens

The underlying bug is improper neutralization of user-controlled input in an HTML context. The application treats package and notebook names as trusted markup and inserts them directly into DOM content through innerHTML. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • Malicious script content may execute in a victim's browser context
  • An attacker could perform actions available to the victim within SiYuan
  • Sensitive information visible to the application may be exposed
  • User settings or notebook content could be modified
  • The vulnerability could support phishing or unauthorized account activity

General mitigation guidance

Mitigation generally focuses on treating package and notebook names as untrusted data throughout their lifecycle.

Common defensive patterns include:

  • Prefer text-content DOM APIs or framework-safe rendering over direct innerHTML interpolation
  • Apply context-appropriate output encoding at every HTML rendering boundary
  • Use narrowly scoped sanitization only where formatted markup is an intentional requirement
  • Validate names against an explicit, restrictive format when business rules permit
  • Enforce content security controls that limit script execution as a defense in depth
  • Apply least privilege to browser sessions and separate administrative workflows where practical

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules for innerHTML, unsafe template interpolation, and equivalent DOM sinks
  • Code review checks tracing package, notebook, and other persisted names into HTML rendering
  • Tests that render markup-bearing input in every dialog and notification path
  • Dynamic security testing for stored payload execution across user workflows
  • Policy enforcement requiring safe DOM APIs or approved output-encoding utilities
  • Automated code review tools that flag untrusted data flowing into browser script or HTML contexts

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-hvwp-43j9-4xgf
vulncheck.comvulncheck.com/advisories/siyuan-before-3.8.1-stored-xss-via-confirmdialog

Frequently asked

questions

Exploitability depends on how package and notebook names are submitted and synchronized. An attacker may be able to deliver the stored content remotely if the relevant package submission or sharing workflow is accessible.

The attacker needs a way to create or influence a package name or notebook name that is later displayed by the vulnerable dialog. A victim must then open the affected workflow.

Treat names as text rather than HTML, use safe DOM rendering APIs, and apply context-appropriate output encoding before displaying any untrusted value.

Establish secure frontend rendering standards, review all data flows into HTML sinks, test stored input across user workflows, and enforce browser security policies as defense in depth.

Find out what's already
exploitable in your codebase.