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 with raw special characters. An attacker can embed a malicious IAL value inside a .sy document, package it as a .sy.zip, and have the victim import it through the normal Import -> SiYuan .sy.zip workflow. Once the note is opened, the malicious attribute breaks out of its original HTML context and injects an event handler, resulting in stored XSS. In the Electron desktop client, this XSS reaches remote code execution because injected JavaScript runs with access to Node/Electron APIs. This issue has been patched in version 3.6.2.
CVE-2026-34585 is a critical stored XSS vulnerability in SiYuan knowledge management system (versions before 3.6.2) that allows attackers to inject malicious code through crafted block attributes in .sy.zip files. When imported and opened, the XSS payload executes with Node/Electron API access in desktop clients, enabling remote code execution. The vulnerability is actively exploitable and poses significant risk to organizations using SiYuan for sensitive document management.
IMMEDIATE ACTIONS:
1. Identify all SiYuan installations across your organization using asset discovery tools
2. Restrict import functionality for .sy.zip files until patching is complete
3. Disable SiYuan Electron desktop client if not critical to operations
4. Audit recent .sy.zip imports and review imported documents for suspicious attributes
PATCHING GUIDANCE:
1. Upgrade SiYuan to version 3.6.2 or later immediately
2. For web-based deployments, update the server component and restart services
3. For Electron clients, force update through your deployment mechanism
4. Verify patch installation by checking version in Settings > About
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement network segmentation to isolate SiYuan systems
2. Disable JavaScript execution in SiYuan settings if available
3. Restrict user permissions to prevent .sy.zip imports
4. Monitor file system for suspicious process spawning from SiYuan processes
5. Implement application whitelisting on systems running SiYuan
DETECTION RULES:
1. Monitor for .sy.zip file imports with suspicious IAL (Inline Attribute List) values containing HTML entities mixed with special characters (e.g., <, >, onclick, onerror)
2. Alert on SiYuan process spawning child processes (cmd.exe, powershell.exe, bash, etc.)
3. Monitor for unusual network connections initiated from SiYuan processes
4. Log and review all document imports from external sources
5. Implement EDR rules to detect XSS payload patterns in file attributes
الإجراءات الفورية:
1. تحديد جميع تثبيتات SiYuan عبر مؤسستك باستخدام أدوات اكتشاف الأصول
2. تقييد وظيفة الاستيراد لملفات .sy.zip حتى يتم إكمال التصحيح
3. تعطيل عميل SiYuan Electron إذا لم يكن حرجاً للعمليات
4. تدقيق استيرادات .sy.zip الأخيرة ومراجعة المستندات المستوردة للبحث عن سمات مريبة
إرشادات التصحيح:
1. ترقية SiYuan إلى الإصدار 3.6.2 أو أحدث فوراً
2. للنشر القائم على الويب، قم بتحديث مكون الخادم وإعادة تشغيل الخدمات
3. لعملاء Electron، فرض التحديث من خلال آلية النشر الخاصة بك
4. التحقق من تثبيت التصحيح بالتحقق من الإصدار في الإعدادات > حول
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تنفيذ تقسيم الشبكة لعزل أنظمة SiYuan
2. تعطيل تنفيذ JavaScript في إعدادات SiYuan إن أمكن
3. تقييد أذونات المستخدم لمنع استيراد .sy.zip
4. مراقبة نظام الملفات للبحث عن عمليات مريبة تنبثق من عمليات SiYuan
5. تنفيذ قائمة بيضاء للتطبيقات على الأنظمة التي تقوم بتشغيل SiYuan
قواعد الكشف:
1. مراقبة استيرادات ملفات .sy.zip بقيم IAL مريبة تحتوي على كيانات HTML مختلطة مع أحرف خاصة
2. التنبيه عند عملية SiYuan التي تنبثق عمليات فرعية
3. مراقبة الاتصالات الشبكية غير العادية التي تبدأ من عمليات SiYuan
4. تسجيل ومراجعة جميع استيرادات المستندات من مصادر خارجية
5. تنفيذ قواعد EDR للكشف عن أنماط حمولة XSS في سمات الملفات