SiYuan XSS to RCE (CVE-2026-34585)
CVE-2026-34585
SiYuan is a personal knowledge management system. Prior to version 3.6.2, a vulnerability allows crafted block attribute values to bypass server-side attribute escaping when an HTML entity is mixed wi...
Overview
A security vulnerability in the SiYuan personal knowledge management system, tracked as CVE-2026-34585, allows for stored cross-site scripting (XSS) that can escalate to full remote code execution (RCE). The flaw exists due to improper escaping of block attribute values when importing specially crafted note files.
Vulnerability Details
In SiYuan versions prior to 3.6.2, the server-side processing of block attributes fails to properly escape input when an HTML entity is mixed with raw special characters. An attacker can exploit this by creating a malicious note with a crafted inline attribute list (IAL) value, packaging it into a .sy.zip file, and tricking a user into importing it via the standard “Import -> SiYuan .sy.zip” workflow.
When the victim opens the imported note, the malicious payload breaks out of its intended HTML context and injects a JavaScript event handler, achieving stored XSS. In the SiYuan Electron desktop application, this XSS is particularly severe because any injected JavaScript executes within the Node.js/Electron context, granting it access to powerful system APIs. This directly enables remote code execution on the victim’s machine.
Impact
The primary impact is on users of the SiYuan Electron desktop client. Successful exploitation allows an attacker to execute arbitrary code on the victim’s system with the same privileges as the SiYuan application. This could lead to complete system compromise, data theft from the knowledge base, or deployment of further malware. The attack requires user interaction (importing and opening a malicious file), but this is a common action within the normal use of the software.
Remediation and Mitigation
The vendor has released a patch in SiYuan version 3.6.2. All users must update their installations to this version or later immediately.
Actionable Steps:
- Update: Upgrade SiYuan to version 3.6.2 or the latest available version. This is the only complete remediation.
- User Awareness: Advise users to exercise caution and only import
.sy.zipfiles from trusted sources. However, this is a mitigation, not a fix, as the vulnerability lies in the software’s processing. - Audit: Review any recently imported note files if you suspect compromise. For the latest on data exposures, you can review breach reports.
Security Insight
This vulnerability highlights the amplified risk of XSS flaws in desktop applications built on frameworks like Electron. What would be a contained browser-based issue becomes a critical RCE vector when the renderer process has Node integration enabled. It mirrors past incidents in other Electron apps, underscoring the need for developers to implement strict context isolation and treat all user input-even from “document” files-with the same severity as network-facing input. For ongoing analysis of such threats, follow our security news coverage.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Am I Affected by CVE-2026-34585?
Pick an ecosystem, paste your installed version, and we'll compare it against the fixed version published on OSV.dev. Browser-only — nothing is sent to a server.
Heuristic comparison only. Always cross-check against the vendor advisory before making patching decisions.
Related Advisories
SiYuan is a personal knowledge management system. Prior to version 3.6.2, an attacker who can place a malicious URL in an Attribute View mAsse field can trigger stored XSS when a victim opens the Gall...
SiYuan is a personal knowledge management system. Prior to version 3.5.9, an unauthenticated reflected XSS vulnerability exists in the dynamic icon API endpoint "GET /api/icon/getDynamicIcon" when typ...
Note Mark is an open-source note-taking application. In versions 0.19.1 and prior, the asset delivery handler serves uploaded files inline and relies on magic-byte detection for content type, which do...
OpenEMR is a free and open source electronic health records and medical practice management application. Users with the `Notes - my encounters` role can fill Eye Exam forms in patient encounters. The ...