/

CVE-2026-73053

Severity:

CRITICAL RISK

(9.0)

Cross-Site Scripting (CWE-79) in SiYuan Emoji Renderer

CVE-2026-73053

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Arbitrary 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 contains a cross-site scripting vulnerability in the unicode2Emoji function, which does not adequately sanitize output from one codepoint-processing branch. An attacker who can introduce a crafted document icon may execute script in the renderer and, when Node integration is enabled, potentially run code on the host system.

Affected context

The vulnerability occurs in SiYuan's document icon rendering path when the unicode2Emoji function processes attacker-controlled, hex-encoded content. Risk is higher in deployments where crafted documents or icons can be imported, synchronized, shared, or otherwise introduced by an untrusted party, particularly when the renderer has Node integration or comparable host access enabled.

Exploit preconditions

  • Attack surface: SiYuan document or icon rendering
  • Required access: Ability to create, modify, import, or cause processing of a document containing a crafted icon
  • Trigger point: Rendering of the document icon through the unicode2Emoji function
  • Why exploitation is possible: A codepoint-processing branch emits insufficiently sanitized markup, allowing script content to reach the renderer; Node integration can extend that script's capabilities to the host environment

Why this happens

The underlying bug is improper output handling in a function that converts Unicode codepoints into rendered content. Because one processing branch fails to encode or sanitize attacker-controlled markup before insertion into the renderer, supplied data can be interpreted as executable HTML or script rather than inert text. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Enabling Node integration further increases the consequence by exposing privileged runtime capabilities to renderer-executed script.

Potential impact

  • An attacker may execute script in the SiYuan renderer
  • Script execution could lead to arbitrary code execution on the host system when Node integration is enabled
  • Sensitive local documents, tokens, or application data could be exposed
  • The application may be manipulated or used as a foothold for further compromise
  • Malicious content could spread through shared, imported, or synchronized documents

General mitigation guidance

Mitigation generally focuses on treating document metadata and icon values as untrusted input throughout their lifecycle.

Common defensive patterns include:

  • Encoding text for the specific output context instead of concatenating it into markup
  • Sanitizing generated markup with a narrowly defined allowlist when HTML is required
  • Keeping Node integration disabled for renderer content unless it is strictly necessary
  • Separating privileged APIs from untrusted document-rendering contexts
  • Applying least privilege to the application process and restricting access to sensitive host resources
  • Validating document metadata before rendering and preserving inert representations by default

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unsanitized values passed to HTML, DOM, or template sinks
  • Code review checks for Unicode conversion routines that construct markup from document-controlled values
  • Tests that render encoded, malformed, and boundary-case codepoints in isolated browser contexts
  • Runtime monitoring for unexpected renderer process behavior or child-process creation
  • Policy enforcement that prevents Node integration and privileged APIs in untrusted content views
  • Automated security review tools that flag DOM-based XSS patterns and unsafe renderer configuration

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-vx5w-qrvp-mmcq
vulncheck.comvulncheck.com/advisories/siyuan-before-cross-site-scripting-via-unicode2emoji

Frequently asked

questions

It is generally dependent on the ability to introduce or cause processing of a crafted document icon. That content may arrive through sharing, synchronization, import, or another application-specific document distribution path.

The attacker needs a way to supply or influence document content that SiYuan renders. Direct operating-system access is not necessarily required if untrusted documents can be opened by a victim or processed by the application.

Treat icon and document metadata as untrusted, context-encode values before rendering, sanitize any required markup with a strict allowlist, and keep Node integration disabled for untrusted renderer content.

Combine secure output encoding, isolated renderer design, least-privilege application permissions, security-focused tests for document content, and review policies covering DOM sinks and privileged JavaScript integration.

Find out what's already
exploitable in your codebase.