CVE-2026-31809
Received Received - Intake
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
SiYuan is a personal knowledge management system. Prior to 3.5.10, SiYuan's SVG sanitizer (SanitizeSVG) checks href attributes for the javascript: prefix using strings.HasPrefix(). However, inserting ASCII tab (	), newline (
), or carriage return (
) characters inside the javascript: string bypasses this prefix check. Browsers strip these characters per the WHATWG URL specification before parsing the URL scheme, so the JavaScript still executes. This allows an attacker to inject executable JavaScript into the unauthenticated /api/icon/getDynamicIcon endpoint, creating a reflected XSS. This is a second bypass of the fix for CVE-2026-29183 (fixed in v3.5.9). This vulnerability is fixed in 3.5.10.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-10
Last Modified
2026-03-11
Generated
2026-05-07
AI Q&A
2026-03-10
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
b3log siyuan to 3.5.10 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart