CVE-2026-31807
Reflected XSS in SiYuan SVG Sanitizer via Animation Elements
Publication date: 2026-03-10
Last updated on: 2026-03-11
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| b3log | siyuan | to 3.5.10 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in SiYuan, a personal knowledge management system, in versions prior to 3.5.10. The SVG sanitizer (SanitizeSVG) is designed to block dangerous SVG elements like <script>, <iframe>, and <foreignobject>, as well as remove event handlers and javascript: in href attributes. However, it does not block SVG animation elements such as <animate> and <set>, which can dynamically change attributes to dangerous values at runtime. This allows an attacker to inject executable JavaScript through the unauthenticated /api/icon/getDynamicIcon endpoint (type=8), resulting in a reflected Cross-Site Scripting (XSS) attack. This vulnerability bypasses a previous fix (CVE-2026-29183) and is resolved in version 3.5.10.
How can this vulnerability impact me? :
The vulnerability allows an attacker to inject and execute malicious JavaScript code in the context of the affected application without authentication. This reflected XSS can lead to unauthorized actions such as stealing user credentials, session hijacking, defacement, or delivering malware to users interacting with the vulnerable endpoint.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade SiYuan to version 3.5.10 or later, as this version includes the fix that blocks SVG animation elements which can be used to inject executable JavaScript.