SiYuan is a personal knowledge management system. From version 3.6.0 to before version 3.6.2, the SanitizeSVG function introduced in version 3.6.0 to fix XSS in the unauthenticated /api/icon/getDynamicIcon endpoint can be bypassed by using namespace-prefixed element names such as <x:script xmlns:x="http://www.w3.org/2000/svg">. The Go HTML5 parser records the element's tag as "x:script" rather than "script", so the tag check passes it through. The SVG is served with Content-Type: image/svg+xml and no Content Security Policy; when a browser opens the response directly, its XML parser resolves the prefix to the SVG namespace and executes the embedded script. This issue has been patched in version 3.6.2.
SiYuan knowledge management system versions 3.6.0-3.6.1 contain an XSS vulnerability in the /api/icon/getDynamicIcon endpoint where the SanitizeSVG function can be bypassed using namespace-prefixed SVG elements. Attackers can inject malicious scripts that execute when SVG files are opened directly in browsers due to missing Content Security Policy headers.
ثغرة Cross-Site Scripting (XSS) في نقطة نهاية API غير مصرح بها في نظام SiYuan تسمح بتجاوز آليات التنظيف عبر استخدام عناصر SVG ذات بادئات مساحة الأسماء. يمكن للمهاجمين تنفيذ كود JavaScript عشوائي عندما يفتح المستخدمون ملفات SVG المصابة مباشرة في متصفحاتهم.
نظام إدارة المعرفة SiYuan في الإصدارات 3.6.0-3.6.1 يحتوي على ثغرة XSS في نقطة نهاية /api/icon/getDynamicIcon حيث يمكن تجاوز وظيفة SanitizeSVG باستخدام عناصر SVG ذات بادئات مساحة الأسماء. يمكن للمهاجمين حقن نصوص برمجية ضارة تُنفذ عند فتح ملفات SVG مباشرة في المتصفحات بسبب رؤوس سياسة أمان المحتوى المفقودة.
Upgrade SiYuan to version 3.6.2 or later immediately. Implement Content Security Policy headers to restrict script execution. Review and validate all user-supplied SVG content. Disable direct SVG rendering if not required. Monitor for suspicious icon requests to the /api/icon/getDynamicIcon endpoint.
قم بترقية SiYuan إلى الإصدار 3.6.2 أو أحدث فوراً. قم بتنفيذ رؤوس سياسة أمان المحتوى لتقييد تنفيذ البرامج النصية. راجع وتحقق من صحة جميع محتويات SVG المزودة من قبل المستخدم. قم بتعطيل عرض SVG المباشر إذا لم يكن مطلوباً. راقب الطلبات المريبة إلى نقطة النهاية /api/icon/getDynamicIcon.