VYPR
Low severityOSV Advisory· Published Jan 19, 2026· Updated Jan 20, 2026

SiYuan Vulnerable to Reflected Cross-Site Scripting (XSS) via /api/icon/getDynamicIcon

CVE-2026-23847

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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/siyuan-note/siyuan/kernelGo
< 0.0.0-20260118021606-5c0cc375b4750.0.0-20260118021606-5c0cc375b475

Affected products

1

Patches

1
5c0cc375b475

:lock: Do not execute scripts in serving SVG by default to prevent XSS https://github.com/siyuan-note/siyuan/issues/16844

https://github.com/siyuan-note/siyuanDanielJan 18, 2026via ghsa
1 file changed · +4 0
  • kernel/api/icon.go+4 0 modified
    @@ -164,6 +164,10 @@ func getDynamicIcon(c *gin.Context) {
     		svg = generateTypeOneSVG(color, lang, dateInfo)
     	}
     
    +	if !model.Conf.Editor.AllowSVGScript {
    +		svg = util.RemoveScriptsInSVG(svg)
    +	}
    +
     	c.Header("Content-Type", "image/svg+xml")
     	c.Header("Cache-Control", "no-cache")
     	c.Header("Pragma", "no-cache")
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.