GitHub Advisoryadvisory · Go

GHSA-pcjq-j3mq-jv5j SiYuan Has a Stored Cross-Site Scripting (XSS) Vulnerability via Unrestricted SVG File Upload

MEDIUM Published 2026-01-16 Modified 2026-01-21 Official page ↗
Aliases
CVE-2026-23645
Ecosystem
Go
Packages
github.com/siyuan-note/siyuan/kernel
Severity
Moderate
CVSS vector
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
Weaknesses
CWE-79
Reviewed
2026-01-16

Affected packages

• Go github.com/siyuan-note/siyuan/kernel: < 0.0.0-20260116101155-11115da3d0de → fixed in 0.0.0-20260116101155-11115da3d0de

Description

Summary A Stored Cross-Site Scripting (XSS) vulnerability exists in SiYuan Note. The application does not sanitize uploaded SVG files. If a user uploads and views a malicious SVG file (e.g., imported from an untrusted source), arbitrary JavaScript code is executed in the context of their authenticated session. Details The application allows authenticated users to upload files, including .svg images, without sanitizing the input to remove embedded JavaScript code (such as tags or event handlers). PoC 1. Create a new "Daily note" in the workspace. 2. Create a file named test.svg with malicious JavaScript inside: ``` alert(window.origin); ``` 3. Upload a file in current daily note: 4. Open the file: • Right-click the uploaded asset in the note. • Select "Export" 5. The JavaScript code executes immediately. Impact The vulnerability allows to upload an SVG file containing malicious scripts. When a user exports this file, the embedded arbitrary JavaScript code is executed within their browser context Notes Tested version: Solution https://github.com/siyuan-note/siyuan/issues/16844

Related

Alias · CVE (1)

  • CVE-2026-23645 SiYuan is self-hosted, open source personal knowledge management software. vulnerability

Weakness · CWE (1)

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

References