GHSA-99rq-75j6-5j9f: Stored and Reflected XSS in SiYuan via SVG Sanitizer Bypass
Vulnerability ID: GHSA-99RQ-75J6-5J9F
CVSS Score: 8.7
Published: 2026-09-03
A stored and reflected Cross-Site Scripting (XSS) vulnerability was identified in the SiYuan kernel before version v3.7.3. The flaw occurs due to a parser differential between the backend Go-based HTML sanitizer and the browser-side XML rendering engine. Attackers can bypass the SVG sanitizer to execute arbitrary JavaScript within the context of the application's origin, leading to complete workspace compromise, data exfiltration, and full local kernel API manipulation.
TL;DR
An HTML vs XML parser differential in the SiYuan SVG sanitizer allows attackers to inject and execute arbitrary JavaScript within the application's origin, bypassing default security controls.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-79
- Attack Vector: Network
- CVSS v3.1: 8.7 (High)
- CVSS v4.0: 9.3 (Critical)
- Exploit Status: poc
- KEV Status: Not Listed
Affected Systems
- SiYuan Kernel (before v3.7.3)
- SiYuan Desktop Application (before v3.7.3)
- SiYuan Self-Hosted Docker Instances (before v3.7.3)
-
SiYuan: < v3.7.3 (Fixed in:
v3.7.3)
Code Analysis
Commit: f08dee7
Mitigate XSS vulnerabilities in SVG sanitization and dynamic icons
Exploit Details
- VulnCheck: Vulnerability assessment and analysis of stored/reflected XSS vectors inside SiYuan SVG sanitizers.
Mitigation Strategies
- Upgrade the SiYuan application to version v3.7.3 or later to apply the XML parser sanitization rewrite.
- Apply restrictive Content Security Policy (CSP) headers to all endpoints serving XML/SVG assets to block script execution inline.
- Validate and sanitize uploaded zip archives and template files prior to processing them inside local workspaces.
Remediation Steps:
- Verify the current running version of the SiYuan desktop or server kernel.
- If the version is earlier than v3.7.3, update the application to the latest stable release.
- For self-hosted instances behind a reverse proxy, configure the proxy to inject the header 'Content-Security-Policy: script-src \'none\'' on all paths under /assets/ and /api/icon/ to mitigate residual risks.
References
Read the full report for GHSA-99RQ-75J6-5J9F on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)