CVE-2026-31809
Reflected XSS in SiYuan SVG Sanitizer via URL Scheme Bypass
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, prior to version 3.5.10. The issue is in the SVG sanitizer (SanitizeSVG), which attempts to block JavaScript execution by checking if href attributes start with the prefix "javascript:" using a simple string prefix check.
However, an attacker can bypass this check by inserting ASCII tab, newline, or carriage return characters inside the "javascript:" string. Browsers remove these characters before parsing the URL scheme, allowing the JavaScript to execute despite the sanitizer's check.
This leads to a reflected Cross-Site Scripting (XSS) vulnerability on the unauthenticated /api/icon/getDynamicIcon endpoint, enabling attackers to inject and execute malicious JavaScript code.
This vulnerability is a second bypass of a previous fix (CVE-2026-29183) and was fixed in version 3.5.10.
How can this vulnerability impact me? :
This vulnerability allows attackers to execute arbitrary JavaScript code in the context of the affected application without authentication.
Such reflected XSS attacks can lead to session hijacking, theft of sensitive information, unauthorized actions performed on behalf of users, or distribution of malware.
Because the vulnerable endpoint is unauthenticated, any attacker can exploit this flaw remotely.
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 contains the fix for the SVG sanitizer bypass that allows reflected XSS attacks.