Junglewise Threat Intelligence

CVE-2026-66394: SiYuan XSS via SVG sanitizer bypass

CVE-2026-66394 · Severity: high · CVSS 8.7 · Published 2026-07-27

Executive brief

SiYuan, a personal knowledge management system, is vulnerable to security flaws that allow attackers to run unauthorized scripts in a user's browser. By tricking a logged-in user into clicking a link or viewing a malicious file, an attacker could gain full control over the user's workspace, including the ability to read, modify, or delete notes and steal sensitive configuration data. This occurs because the application fails to properly clean malicious code hidden inside SVG image files.

Technical details

A cross-site scripting (XSS) vulnerability exists in SiYuan's 'util.SanitizeSVG' function due to a discrepancy between how the HTML-based sanitizer and the browser's XML/SVG parser handle specific tags. The sanitizer treats content within 'desc', 'style', or 'noscript' tags as raw text and fails to strip nested 'script' tags. However, when the browser renders the resulting 'image/svg+xml' content, it interprets these hidden tags as executable SVG scripts. Attackers can exploit this via a reflected vector using the 'getDynamicIcon' API or a stored vector by uploading a malicious '.svg' asset. Successful exploitation allows for full workspace takeover, including API token theft and note manipulation. The issue is resolved in version 3.7.3.

Affected products

  • siyuan-note SiYuan < 3.7.3

Timeline

  • 2026-07-14: advisory: GitHub Security Advisory published by vendor
  • 2026-07-27: disclosed: NVD publication date
  • 2026-07-27: patched: Fix confirmed available in v3.7.3

References

Related threats