CVE-2026-33066 in SiYuan
Summary
by MITRE • 03/20/2026
SiYuan is a personal knowledge management system. In versions 3.6.0 and below, the backend renderREADME function uses lute.New() without calling SetSanitize(true), allowing raw HTML embedded in Markdown to pass through unmodified. The frontend then assigns the rendered HTML to innerHTML without any additional sanitization. A malicious package author can embed arbitrary JavaScript in their README that executes when a user clicks to view the package details. Because SiYuan's Electron configuration enables nodeIntegration: true with contextIsolation: false, this XSS escalates directly to full Remote Code Execution. The issue was patched in version 3.6.1.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 03/26/2026
The vulnerability CVE-2026-33066 affects SiYuan, a personal knowledge management system, and represents a critical cross-site scripting flaw that can escalate to remote code execution. This issue exists in versions 3.6.0 and earlier where the backend rendering process fails to properly sanitize HTML content embedded within Markdown documents. The root cause lies in the renderREADME function which utilizes lute.New() without invoking SetSanitize(true), creating a pathway for malicious HTML content to bypass security measures. When users navigate to package details, the frontend processes this unsanitized HTML through innerHTML assignment without additional protective measures, establishing the foundation for exploitation.
The technical flaw manifests through improper input validation and sanitization practices that violate established security principles. The vulnerability maps directly to CWE-79: Cross-site Scripting and CWE-116: Improper Encoding or Escaping of Output, as the system fails to properly escape or validate content before rendering. The attack vector leverages the Electron framework's configuration where nodeIntegration: true combined with contextIsolation: false creates an environment where client-side JavaScript execution can directly access node.js capabilities. This architectural decision eliminates crucial security boundaries that would otherwise prevent malicious scripts from escalating beyond browser context into system-level operations.
The operational impact of this vulnerability is severe as it enables attackers to craft malicious packages with embedded JavaScript that executes automatically when users view package details. The escalation from XSS to full remote code execution occurs because the Electron environment allows JavaScript to access native system functions through nodeIntegration, bypassing standard browser security restrictions. This creates a direct pathway for attackers to execute arbitrary commands on affected systems, potentially leading to data theft, system compromise, or further network infiltration. The vulnerability affects all users who view package information within the SiYuan environment, making it particularly dangerous in collaborative or shared knowledge management scenarios.
Mitigation strategies should focus on immediate patch application to version 3.6.1 which addresses the core sanitization issue in the renderREADME function. Organizations should also implement additional security controls including input validation at multiple layers, enhanced content sanitization, and review of Electron configuration settings. Security teams should consider implementing web application firewalls to detect and block suspicious content patterns, while also monitoring for unauthorized package uploads. The fix demonstrates the importance of proper security configuration in Electron applications, particularly regarding nodeIntegration and contextIsolation settings. This vulnerability highlights the need for comprehensive security testing including threat modeling and input validation reviews to prevent similar issues in future development cycles.