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

CVE-2026-23645: SiYuan Has a Stored Cross-Site Scripting (XSS) Vulnerability via Unrestricted SVG File Upload

mediumCVSS 4.0 5.3GHSA-pcjq-j3mq-jv5j

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.

Published Jan 16, 2026

Affected packages

github.com/siyuan-note/siyuan/kernel

Ecosystem
Go
Affected
< 0.0.0-20260116101155-11115da3d0de
Fixed in
0.0.0-20260116101155-11115da3d0de
Check
go list -m github.com/siyuan-note/siyuan/kernel

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.
  1. Create a file named test.svg with malicious JavaScript inside:
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 124 124" fill="none">
<rect width="124" height="124" rx="24" fill="red"/>
   <script type="text/javascript">  
      alert(window.origin);
   </script>
</svg>
  1. Upload a file in current daily note:
  1. Open the file:
  • Right-click the uploaded asset in the note.
  • Select "Export"
  1. 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

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