Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/siyuan-note/siyuan/kernel
  4. ›
  5. GHSA-99rq-75j6-5j9f

GHSA-99rq-75j6-5j9f: SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass

September 3, 2026

SiYuan cleans user supplied SVG with util.SanitizeSVG before it serves the file inline as image/svg+xml. This cleaner is the guard behind the Editor.AllowSVGScript setting, which is off by default, so a <script> inside an SVG is meant to be removed.

The cleaner reads the input as HTML, but the browser reads the served file as XML (SVG). Because the two parsers treat some tags differently, a <script> can be hidden so the cleaner never removes it. The cleaned file still holds a working script. When a browser opens that file as an SVG document, the script runs in the app origin. There is no Content Security Policy in the product to stop it.

The same bug can be reached in two ways. Both share one root cause (the cleaner), so one fix in the cleaner closes both:

  • Reflected, through a single link: GET /api/icon/getDynamicIcon
  • Stored, through a planted .svg asset: GET /assets/<name>.svg

I confirmed this on a live SiYuan 3.7.2 kernel.

References

  • github.com/advisories/GHSA-99rq-75j6-5j9f
  • github.com/siyuan-note/siyuan/commit/f08dee71ba8e087a395d74f121de11e6a997ef14
  • github.com/siyuan-note/siyuan/releases/tag/v3.7.3
  • github.com/siyuan-note/siyuan/security/advisories/GHSA-99rq-75j6-5j9f

Code Behaviors & Features

Detect and mitigate GHSA-99rq-75j6-5j9f with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20260714095344-f08dee71ba8e

Fixed versions

  • 0.0.0-20260714095344-f08dee71ba8e

Solution

Upgrade to version 0.0.0-20260714095344-f08dee71ba8e or above.

Impact 8.7 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

go/github.com/siyuan-note/siyuan/kernel/GHSA-99rq-75j6-5j9f.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:21:44 +0000.