NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2026-23847: SiYuan has a Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon

lowCVSS 4.0 2.1 · 3.1 4.6GHSA-w836-5gpm-7r93

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: test alert(window.origin) 1.

Published Jan 21, 2026

Affected packages

github.com/siyuan-note/siyuan/kernel

Ecosystem
Go
Affected
< 0.0.0-20260118021606-5c0cc375b475
Fixed in
0.0.0-20260118021606-5c0cc375b475
Check
go list -m github.com/siyuan-note/siyuan/kernel

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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: test</text><script>alert(window.origin)</script><text>

  1. Open any note and click Change Icon -> Dynamic (Text).
  1. Change color and paste the payload into the Custom field and click on this icon.
  1. Intercept and send the request or get path from devtools
  1. 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 < or > in icon text.

Note

Tested version:

Credited to jaroslaw-wawiorko.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Go vulnerabilities

All Go entries