SiYuan SVG Sanitizer Bypass Leading to Unauthenticated Cross-Site Scripting Vulnerability

Vulnerability

A vulnerability in SiYuan's SVG sanitizer prior to version 3.5.10 allows for a bypass of the sanitizer's protections, leading to reflected cross-site scripting (XSS) vulnerabilities. The sanitizer, which is intended to block dangerous SVG elements and attributes, fails to account for animation elements like `<animate>` and `<set>`. These elements can be exploited to inject executable JavaScript into the unauthenticated `/api/icon/getDynamicIcon` endpoint, bypassing the static sanitization and creating a reflected XSS vulnerability. This issue is a direct bypass of the fix implemented for CVE-2026-29183, which was addressed in version 3.5.9.

Impact

Exploitation of this vulnerability allows for unauthenticated reflected cross-site scripting via SVG injection, with the executed JavaScript running in the context of the SiYuan application. This could lead to theft of session cookies, API tokens, or unauthorized access to authenticated APIs for reading or modifying notes.

Reproduction

To reproduce this vulnerability, send a GET request to the `/api/icon/getDynamicIcon` endpoint with a `type` parameter set to `8`. Include a `content` parameter that contains an SVG payload using the `<animate>` or `<set>` elements. The SVG sanitizer will not block these elements, allowing the injection of JavaScript into the response. When the SVG is rendered in a browser, the injected JavaScript will execute, demonstrating the cross-site scripting vulnerability.

Remediation

Users can update to SiYuan version 3.5.10 or later, where this vulnerability has been fixed.

Added: Mar 10, 2026, 9:19 PM
Updated: Mar 10, 2026, 9:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
1.7
exploitability
7.2
remediation
7.7
relevance
3.7
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.