SiYuan has a Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon
Package
Affected versions
< 0.0.0-20260118021606-5c0cc375b475
Patched versions
0.0.0-20260118021606-5c0cc375b475
Description
Published by the National Vulnerability Database
Jan 19, 2026
Published to the GitHub Advisory Database
Jan 21, 2026
Reviewed
Jan 21, 2026
Last updated
Jan 21, 2026
Summary
Reflected XSS in /api/icon/getDynamicIcon due to unsanitized SVG input.
Details
The endpoint generates SVG images for text icons (type=8). The content query parameter is inserted directly into the SVG tag without XML escaping. Since the response Content-Type is image/svg+xml, injecting unescaped tags allows breaking the XML structure and executing JavaScript.
PoC
Payload:
test</text><script>alert(window.origin)</script><text>Impact
Arbitrary JavaScript execution in the user's session context if the SVG is loaded directly. It also prevents using legitimate characters like < or > in icon text.
Note
Tested version:

References