GitHub Advisoryadvisory · Go

GHSA-w836-5gpm-7r93 SiYuan has a Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon

LOW Published 2026-01-21 Modified 2026-01-21 Official page ↗
Aliases
CVE-2026-23847
Ecosystem
Go
Packages
github.com/siyuan-note/siyuan/kernel
Severity
Low
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2026-01-21

Affected packages

• Go github.com/siyuan-note/siyuan/kernel: < 0.0.0-20260118021606-5c0cc375b475 → fixed in 0.0.0-20260118021606-5c0cc375b475

Description

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 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: `testalert(window.origin)` 1. Open any note and click Change Icon -> Dynamic (Text). 2. Change color and paste the payload into the Custom field and click on this icon. 3. Intercept and send the request or get path from devtools 4. The JavaScript payload executes afted open URL. Impact Arbitrary JavaScript execution in the user's session context if the SVG is loaded directly. It also prevents using legitimate characters like in icon text. Note Tested version:

Related

Alias · CVE (1)

  • CVE-2026-23847 SiYuan is a personal knowledge management system. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References