CVE-2026-66396 in SiYuaninfo

Summary

by MITRE • 07/27/2026

SiYuan before v3.7.2 fails to escape the title-img Individual Attribute List value when rendering Gallery and Kanban cover images, allowing stored cross-site scripting via unescaped style attribute interpolation. Attackers with editor permissions can inject onload handlers that execute arbitrary code in the Electron renderer with full Node.js access when victims open affected documents.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 07/27/2026

This vulnerability exists in SiYuan before version 3.7.2 where the application fails to properly escape the title-img individual attribute list value during rendering of gallery and kanban cover images. The flaw manifests as insufficient input validation and output escaping mechanisms that allow maliciously crafted style attribute interpolation to persist in the rendered document. When documents containing such crafted content are opened by victims, the unescaped JavaScript code within the style attributes executes within the Electron renderer context, creating a severe cross-site scripting attack vector.

The technical implementation of this vulnerability stems from improper sanitization of user-provided data within the document rendering pipeline. Specifically when processing gallery and kanban components that utilize title-img attributes, the application does not adequately filter or escape special characters that could enable script execution. This represents a classic stored cross-site scripting vulnerability where malicious payloads are stored in the application's database and executed during subsequent rendering operations. The vulnerability is particularly dangerous because it leverages the Electron framework's renderer process which operates with full Node.js access privileges, providing attackers with extensive system-level capabilities.

The operational impact of this vulnerability is severe for organizations using SiYuan as their primary document management platform. Attackers with editor permissions can craft malicious documents containing embedded JavaScript payloads that execute automatically when victims open affected files. These payloads can leverage the full Node.js API access available in the Electron renderer to perform actions such as file system manipulation, network communications, privilege escalation, and data exfiltration. The attack requires only that victims open compromised documents, making it particularly effective for social engineering campaigns where attackers might distribute malicious documents through normal collaboration channels.

The vulnerability aligns with CWE-79 Cross-site Scripting and follows ATT&CK technique T1059.007 Command and Scripting Interpreter: JavaScript, demonstrating how web-based applications can be exploited to execute arbitrary code in the context of the victim's browser environment. Organizations should immediately implement the mitigation strategy of updating to SiYuan version 3.7.2 or later where proper input sanitization has been implemented. Additional protective measures include restricting editor permissions to trusted users only, implementing content security policies, and conducting regular security reviews of document collaboration workflows. Network-based detection measures such as web application firewalls should also be configured to monitor for suspicious style attribute patterns that may indicate exploitation attempts.

The root cause analysis reveals inadequate input validation controls within the SiYuan rendering engine's handling of title-img attributes in gallery and kanban components. This flaw demonstrates a critical gap in the application's security architecture where user-controlled data flows directly into rendered HTML output without proper sanitization. The vulnerability represents a failure to implement proper output encoding mechanisms that would prevent script execution contexts from being established within style attributes, particularly in environments where the renderer has elevated privileges through Node.js integration.

Responsible

VulnCheck

Reservation

07/26/2026

Disclosure

07/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!