2.1low
SiYuan Vulnerable to Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon
- Severity
- 2.1low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.31% (higher than 26% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w836-5gpm-7r93GO-2026-4343
Description
SiYuan is a personal knowledge management system. Versions prior to 3.5.4 are vulnerable to reflected cross-site scripting in /api/icon/getDynamicIcon due to unsanitized SVG input. The endpoint generates SVG images for text icons (type=8). The content query parameter is inserted directly into the SVG <text> tag without XML escaping. Since the response Content-Type is image/svg+xml, injecting unescaped tags allows breaking the XML structure and executing JavaScript. Version 3.5.4 patches the issue.]
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| siyuan-note siyuan | < 3.5.4 | CVE List |
| github.com/siyuan-note/siyuan/kernel (Go) | before 0.0.0-20260118021606-5c0cc375b475 | GitHub Advisory Database, Go Vulnerability Database |
| b3log siyuan | before 3.5.4 | NVD |
All scores
| GitHub_M | 2.1low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P |
| GitHub | 4.6low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
SiYuan is a personal knowledge management system. Versions prior to 3.5.4 are vulnerable to reflected cross-site scripting in /api/icon/getDynamicIcon due to unsanitized SVG input. The endpoint generates SVG images for text icons (type=8). The content query parameter is inserted directly into the SVG <text> tag without XML escaping. Since the response Content-Type is image/svg+xml, injecting unescaped tags allows breaking the XML structure and executing JavaScript. Version 3.5.4 patches the issue.]
GitHub Advisory Database
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 <text> 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>
-
Open any note and click Change Icon -> Dynamic (Text).
image -
Change color and paste the payload into the Custom field and click on this icon.
image -
Intercept and send the request or get path from devtools
image
- The JavaScript payload executes afted open URL. image
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: image
Go Vulnerability Database
SiYuan has a Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon in github.com/siyuan-note/siyuan/kernel
NVD (es)
SiYuan es un sistema de gestión de conocimiento personal. Las versiones anteriores a la 3.5.4 son vulnerables a cross-site scripting reflejado en /API/icon/getDynamicIcon debido a una entrada SVG no saneada. El endpoint genera imágenes SVG para iconos de texto (type=8). El parámetro de consulta content se inserta directamente en la etiqueta SVG sin escape XML. Dado que el Content-Type de la respuesta es image/svg+xml, la inyección de etiquetas sin escape permite romper la estructura XML y ejecutar JavaScript. La versión 3.5.4 corrige el problema.
References
| https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w836-5gpm-7r93 | advisory, exploit, patch, vendor-advisory, web | |
| https://github.com/siyuan-note/siyuan/issues/16844 | issue-tracking, patch, web | |
| https://github.com/siyuan-note/siyuan/commit/5c0cc375b47567e15edd2119066b09bb0aa18777 | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-23847 | advisory | |
| https://github.com/siyuan-note/siyuan | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23847 changed 2026-01-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w836-5gpm-7r93 changed 2026-02-03 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4343 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2026-23847 changed 2026-06-17 | Public domain |