CVE-2026-41421: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in siyuan-note siyuan
SiYuan is an open-source personal knowledge management system. Prior to 3.6.5, SiYuan desktop renders notification messages as raw HTML inside an Electron renderer. The notification route POST /api/notification/pushMsg accepts a user-controlled msg value, forwards it through the backend broadcast layer, and the frontend inserts it into the DOM with insertAdjacentHTML(...) at message.ts. On desktop builds, this is not limited to ordinary XSS. Electron windows are created with nodeIntegration: true, contextIsolation: false, and webSecurity: false at main.js. As a result, JavaScript executed from the notification sink can directly access Node APIs and escalate to desktop code execution. This vulnerability is fixed in 3.6.5.
AI Analysis
Technical Summary
SiYuan versions before 3.6.5 have a vulnerability where the notification route POST /api/notification/pushMsg accepts a user-controlled message that is inserted into the DOM using insertAdjacentHTML without sanitization. Because Electron windows are configured insecurely (nodeIntegration enabled, contextIsolation disabled, webSecurity disabled), this leads to OS command injection via JavaScript execution with Node API access, allowing an attacker to execute arbitrary code on the desktop. This vulnerability is addressed in SiYuan 3.6.5.
Potential Impact
Successful exploitation allows an attacker with low privileges and no user interaction to execute arbitrary code on the desktop environment with the privileges of the SiYuan application. This can lead to full compromise of the affected system, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Upgrade SiYuan to version 3.6.5 or later, where this vulnerability is fixed. No other mitigation is indicated or required as the vendor has addressed the issue in this release. Patch status is confirmed by the vendor advisory stating the fix is in version 3.6.5.
CVE-2026-41421: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in siyuan-note siyuan
Description
SiYuan is an open-source personal knowledge management system. Prior to 3.6.5, SiYuan desktop renders notification messages as raw HTML inside an Electron renderer. The notification route POST /api/notification/pushMsg accepts a user-controlled msg value, forwards it through the backend broadcast layer, and the frontend inserts it into the DOM with insertAdjacentHTML(...) at message.ts. On desktop builds, this is not limited to ordinary XSS. Electron windows are created with nodeIntegration: true, contextIsolation: false, and webSecurity: false at main.js. As a result, JavaScript executed from the notification sink can directly access Node APIs and escalate to desktop code execution. This vulnerability is fixed in 3.6.5.
CVSS v3.1
Score 8.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SiYuan versions before 3.6.5 have a vulnerability where the notification route POST /api/notification/pushMsg accepts a user-controlled message that is inserted into the DOM using insertAdjacentHTML without sanitization. Because Electron windows are configured insecurely (nodeIntegration enabled, contextIsolation disabled, webSecurity disabled), this leads to OS command injection via JavaScript execution with Node API access, allowing an attacker to execute arbitrary code on the desktop. This vulnerability is addressed in SiYuan 3.6.5.
Potential Impact
Successful exploitation allows an attacker with low privileges and no user interaction to execute arbitrary code on the desktop environment with the privileges of the SiYuan application. This can lead to full compromise of the affected system, including confidentiality, integrity, and availability impacts.
Mitigation Recommendations
Upgrade SiYuan to version 3.6.5 or later, where this vulnerability is fixed. No other mitigation is indicated or required as the vendor has addressed the issue in this release. Patch status is confirmed by the vendor advisory stating the fix is in version 3.6.5.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-20T15:32:33.813Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ebc30587115cfb68680b10
Added to database: 4/24/2026, 7:22:45 PM
Last enriched: 5/1/2026, 8:39:18 PM
Last updated: 6/8/2026, 8:53:14 PM
Views: 73
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.