CVE-2026-34449 Overview
CVE-2026-34449 is a critical Remote Code Execution (RCE) vulnerability in SiYuan, an open-source personal knowledge management system. The vulnerability arises from an overly permissive Cross-Origin Resource Sharing (CORS) configuration that allows malicious websites to inject JavaScript code via the application's API. When executed within Electron's Node.js context, this injected code gains full operating system access, enabling complete system compromise. No user interaction is required beyond visiting a malicious website while SiYuan is running on the desktop.
Critical Impact
A malicious website can achieve full Remote Code Execution on any desktop running SiYuan by exploiting the permissive CORS policy, requiring no user interaction beyond visiting the attacker's website.
Affected Products
- SiYuan versions prior to 3.6.2
- SiYuan Desktop Application (Electron-based)
- All platforms running vulnerable SiYuan versions (Windows, macOS, Linux)
Discovery Timeline
- 2026-03-31 - CVE-2026-34449 published to NVD
- 2026-04-01 - Last updated in NVD database
Technical Details for CVE-2026-34449
Vulnerability Analysis
This vulnerability exploits a fundamental misconfiguration in SiYuan's CORS implementation. The application sets Access-Control-Allow-Origin: * combined with Access-Control-Allow-Private-Network: true, creating a dangerous security gap that allows any external website to communicate with SiYuan's local API endpoints. Since SiYuan is built on Electron, JavaScript executed within its context has access to Node.js APIs with full system privileges.
The attack chain is straightforward: when a user visits a malicious website while SiYuan is running, the attacker's page can make cross-origin requests to SiYuan's API. The permissive CORS headers allow these requests to succeed, enabling the attacker to inject malicious JavaScript snippets. These snippets are then executed in Electron's privileged Node.js context the next time the user interacts with SiYuan's UI, granting the attacker complete operating system access.
Root Cause
The root cause is classified as CWE-942: Permissive Cross-domain Policy with Untrusted Domains. SiYuan's API was configured to accept requests from any origin (Access-Control-Allow-Origin: *) while also enabling private network access (Access-Control-Allow-Private-Network: true). This combination effectively defeats browser same-origin protections and allows external websites to interact with the local application API. Combined with Electron's Node.js integration, this creates a direct path from web content to operating system compromise.
Attack Vector
The attack is network-based and requires minimal user interaction. An attacker hosts a malicious website that, when visited by a user running SiYuan, automatically sends API requests to the local SiYuan instance. Due to the permissive CORS configuration, these requests succeed despite originating from an external domain. The attacker can then inject JavaScript payloads that will execute with Node.js privileges within Electron's context.
The exploitation flow involves sending crafted API requests to inject malicious JavaScript snippets into SiYuan's data or rendering pipeline. When the SiYuan UI processes this content, the JavaScript executes in Electron's privileged context, where it has access to Node.js modules like child_process, fs, and os, enabling arbitrary command execution, file system access, and complete system compromise.
Detection Methods for CVE-2026-34449
Indicators of Compromise
- Unexpected outbound network connections from the SiYuan process to unknown external hosts
- Unusual API requests to SiYuan's local endpoints originating from web browsers
- Suspicious JavaScript payloads or unfamiliar code snippets in SiYuan data files
- Unexpected child processes spawned by the SiYuan Electron application
- Anomalous file system modifications or registry changes attributed to the SiYuan process
Detection Strategies
- Monitor for cross-origin requests targeting SiYuan's local API endpoints (typically 127.0.0.1 or localhost)
- Implement network detection rules for unusual CORS preflight requests with Access-Control-Allow-Private-Network headers
- Audit SiYuan data directories for unexpected or obfuscated JavaScript content
- Deploy endpoint detection to identify Node.js child_process execution from Electron applications
Monitoring Recommendations
- Enable detailed logging for SiYuan API access and monitor for requests from non-local origins
- Implement browser network monitoring to detect connections to local services from external web pages
- Use SentinelOne Singularity Platform to monitor for suspicious process spawning from Electron applications
- Configure alerting for any execution of system commands originating from SiYuan's process tree
How to Mitigate CVE-2026-34449
Immediate Actions Required
- Upgrade SiYuan to version 3.6.2 or later immediately
- If immediate upgrade is not possible, disable SiYuan or disconnect it from the network while browsing
- Review system logs for any signs of compromise if SiYuan was running while browsing untrusted websites
- Consider network segmentation to isolate systems running vulnerable SiYuan versions
Patch Information
SiYuan version 3.6.2 addresses this vulnerability by implementing proper CORS restrictions that prevent external websites from accessing the application's API. The patch removes the permissive Access-Control-Allow-Origin: * header and implements appropriate origin validation. Users should upgrade immediately by downloading the latest release from the official SiYuan GitHub releases page. Additional details about the vulnerability and patch are available in the GitHub Security Advisory.
Workarounds
- Ensure SiYuan is not running when browsing untrusted or unknown websites
- Use browser isolation or a separate browser profile that cannot access local network resources
- Implement local firewall rules to block external access to SiYuan's API port
- Consider running SiYuan in a virtualized or containerized environment with restricted network access
# Example: Block external access to SiYuan's local API on Linux using iptables
# This prevents external sites from reaching the local API while allowing local access
iptables -A INPUT -p tcp --dport 6806 -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p tcp --dport 6806 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


