/

CVE-2026-73044

Severity:

CRITICAL RISK

(9.0)

Stored XSS (CWE-79) in SiYuan Table Width Attributes

CVE-2026-73044

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting and Potential Electron 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 stored cross-site scripting vulnerability in table column width handling. An attacker who can submit or modify column-width data through the affected API may inject content into style attributes, causing script execution whenever affected table cells are rendered.

In Electron deployments with Node integration enabled, successful exploitation could extend beyond the renderer and enable arbitrary code execution with the application's available privileges.

Affected context

The issue occurs in SiYuan table rendering when column-width values supplied through the setAttrViewColWidth API are incorporated into style attributes without adequate validation or escaping. It is particularly risky when attacker-controlled or insufficiently trusted users can create or modify table metadata and when the resulting content is opened in an Electron renderer with Node integration enabled.

Exploit preconditions

  • Attack surface: SiYuan table metadata and the setAttrViewColWidth API
  • Required access: The ability to create, modify, synchronize, or otherwise influence table column-width values
  • Trigger point: Rendering table cells whose styles contain the stored value
  • Why exploitation is possible: Width data is accepted without sufficiently restrictive validation or context-aware escaping, allowing stored content to escape the intended style attribute and introduce executable markup or event-handler behavior

Why this happens

The vulnerability is caused by treating a table column-width value as trusted presentation data without enforcing its expected format or applying output encoding appropriate for a style attribute.

When attacker-controlled values are inserted into HTML or DOM-related style contexts, insufficient validation can allow the value to alter surrounding markup and create an executable cross-site scripting condition. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting. Electron-specific security settings, such as Node integration, can increase the consequences of renderer-side script execution.

Potential impact

  • Stored script execution in users' rendered table views
  • Theft or manipulation of application-visible data
  • Actions performed in the victim's application context
  • Compromise of the Electron renderer process
  • Arbitrary local code execution when renderer privileges and Node integration permit it
  • Possible access to files, credentials, or connected services available to the application

General mitigation guidance

Mitigation generally focuses on treating column dimensions as strictly typed presentation values rather than free-form strings.

Common defensive patterns include:

  • Accepting only a narrowly defined numeric width format with safe bounds
  • Rejecting unexpected characters and malformed values at the API boundary
  • Applying context-aware output encoding when values are placed into style attributes or DOM properties
  • Prefering safe DOM style APIs over string-based HTML or attribute construction
  • Avoiding Node integration for untrusted renderer content
  • Using context isolation, restrictive content security policies, and minimal preload exposure
  • Separating user-authored content from privileged application capabilities
  • Applying least privilege to the Electron process and its accessible local resources

How teams detect issues like this

High-level detection can combine:

  • Static analysis for string concatenation or template interpolation into HTML, attributes, and style contexts
  • Code review checks for API fields that are expected to be numeric but are handled as unrestricted strings
  • Tests using malformed, boundary, and context-breaking input to verify rejection and safe rendering
  • Repository-wide searches for direct HTML construction and unsafe DOM insertion
  • Electron configuration reviews covering Node integration, context isolation, preload exposure, and content security policy
  • Runtime monitoring for unexpected renderer navigation, script execution, or privileged API access

Automated security review tools can help identify likely injection sinks, but findings should be confirmed against the actual rendering and trust boundaries.

Sources

SourceLink
github.comgithub.com/siyuan-note/siyuan/security/advisories/GHSA-rj55-w3xr-gj62
vulncheck.comvulncheck.com/advisories/siyuan-before-stored-cross-site-scripting-via-column-width

Frequently asked

questions

Exploitability depends on how table metadata is created and synchronized. It may be reachable through networked or collaborative workflows if an attacker can influence the affected table-width values and another user renders the modified content.

The attacker generally needs a permitted path to create or modify table metadata, directly or through synchronization or collaboration features. Viewing the affected table then provides the rendering trigger.

Validate column widths as constrained numeric values at input boundaries, render them through safe DOM or style APIs, and ensure any remaining output is encoded for its specific context.

Treat all synchronized and user-authored metadata as untrusted, test every output context for injection, and harden Electron renderer privileges with context isolation, minimal preload interfaces, and least-privilege process settings.

Find out what's already
exploitable in your codebase.