Impact
SiYuan’s SVG sanitizer validates href attributes by checking if they start with the string "javascript:". In versions prior to 3.5.10, inserting characters such as ASCII tab, newline, or carriage return within the prefix bypasses this check. Browsers strip those whitespace characters before parsing the URL scheme, so the embedded JavaScript is treated as a valid javascript: URI and executed in the victim’s browser when the SVG is rendered. The flaw therefore allows an attacker to inject and execute arbitrary script code through the public /api/icon/getDynamicIcon endpoint.
Affected Systems
All releases of SiYuan Note before version 3.5.10 are vulnerable. The affected component is the backend SVG sanitization logic that examines href attributes. Any deployment that exposes the unauthenticated /api/icon/getDynamicIcon endpoint is at risk, regardless of whether the server is internally or externally reachable.
Risk and Exploitability
The CVSS score of 6.4 indicates moderate severity. The EPSS score of less than 1 % suggests a low probability of exploitation at the time of analysis, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is an unauthenticated request to the /api/icon/getDynamicIcon endpoint, where a crafted SVG containing a javascript: URI with embedded whitespace is fetched and rendered in a browser that visits the URL. The vulnerability’s impact is the execution of arbitrary JavaScript in the victim’s browser context.
OpenCVE Enrichment
Github GHSA