CVE-2026-23847
JSON

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 packageVersionsReported by
siyuan-note siyuan< 3.5.4CVE List
github.com/siyuan-note/siyuan/kernel (Go)before 0.0.0-20260118021606-5c0cc375b475GitHub Advisory Database, Go Vulnerability Database
b3log siyuanbefore 3.5.4NVD

All scores

GitHub_M2.1low CVSS:4.0CVSS: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
GitHub4.6low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
GitHublow CVSS:4.0CVSS: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
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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>

  1. Open any note and click Change Icon -> Dynamic (Text).

    image
  2. Change color and paste the payload into the Custom field and click on this icon.

    image
  3. Intercept and send the request or get path from devtools

    image
image
  1. The JavaScript payload executes afted open URL. image
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

Sources

SourceRecordLicence
CVE ListCVE-2026-23847 changed 2026-01-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-w836-5gpm-7r93 changed 2026-02-03CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4343 changed 2026-03-03CC-BY-4.0
NVDCVE-2026-23847 changed 2026-06-17Public domain