Siyuan
CVE-2026-32940
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious URL with data:text/xml payload
-
DeliveryUser clicks link to /api/icon/getDynamicIcon endpoint
-
ExploitSVG rendered with unescaped user input
-
ExecutionJavaScript executes in victim browser
-
ImpactSession hijacking or credential theft
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | SiYuan versions 3.6.0 and below. Unauthenticated attacker exploits the /api/icon/getDynamicIcon endpoint with crafted content parameter using data:text/xml or data:application/xml URIs to bypass incomplete SVG sanitization. Victim must click attacker-supplied link to trigger XSS. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N) shows network-exploitable attacks with low complexity requiring no privileges but requiring user interaction, with changed scope and high confidentiality and integrity impact. The attack requires two user actions: navigating to a crafted URL and clicking an injected link, which substantially reduces practical exploitation likelihood compared to stored XSS. The unauthenticated attack vector is concerning for public-facing SiYuan instances, but the requirement for direct navigation to the endpoint or specific embedding techniques (object/embed tags) limits widespread exploitation. No KEV listing or EPSS score is provided in the intelligence data, and no proof-of-concept is explicitly mentioned, suggesting limited active exploitation. Real-world risk is moderate-to-high for internet-exposed instances with multiple users, but lower for private or single-user deployments. The Changed Scope rating indicates potential for cross-domain or cross-privilege boundary attacks, elevating risk in multi-tenant scenarios. |
| Exploit ScenarioDerived | An attacker crafts a malicious URL targeting the /api/icon/getDynamicIcon endpoint with a content parameter containing SVG markup with an href attribute using data:text/xml or data:application/xml encoding that embeds JavaScript. The attacker distributes this URL via phishing emails or social engineering to SiYuan users. When a victim clicks the link and then interacts with the rendered SVG element (such as clicking an injected link or button within the image), the JavaScript executes in the context of the SiYuan application, potentially stealing session cookies, performing unauthorized actions, or exfiltrating sensitive knowledge management data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 20, 2026
SiYuan personal knowledge management system contains a cross-site scripting (XSS) vulnerability in versions 3.6.0 and below. An unauthenticated attacker can exploit the /api/icon/getDynamicIcon endpoint by crafting a malicious URL that bypasses SVG sanitization filters, allowing arbitrary JavaScript execution when a victim clicks an injected link within the rendered SVG. The CVSS score of 9.3 indicates critical severity, though exploitation requires user interaction (clicking a malicious link) and the attack complexity is low.
RemediationAI
Upgrade SiYuan to version 3.6.1 or later, which contains the security fix as documented in the release notes at https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1 and implemented in commit d01d561875d4f744e9f6232f1d4831e3642b8696. Until patching is completed, restrict network access to the /api/icon/getDynamicIcon endpoint using web application firewall rules or reverse proxy access controls to prevent untrusted users from accessing this API. Implement Content-Security-Policy headers with strict script-src directives to mitigate JavaScript execution from inline SVG sources. For internet-facing instances, consider requiring authentication for all API endpoints as an additional defense-in-depth measure.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from an incomplete blocklist in the SanitizeSVG function (CWE-79: Improper Neutralization of Input During Web Page Generation). The sanitizer blocks data:text/html and data:image/svg+xml MIME types in href attributes but fails to filter data:text/xml and data:application/xml, both of which browsers can interpret as SVG with JavaScript execution capabilities. The /api/icon/getDynamicIcon endpoint uses fmt.Sprintf to inject user-controlled input from the content parameter directly into SVG markup without escaping, then serves it with Content-Type: image/svg+xml. This creates a click-through XSS attack vector where interactive SVG elements can trigger JavaScript, though the attack surface is limited since standard img tag rendering doesn't allow interactive links—attackers must either direct victims to the endpoint URL or embed it via object or embed tags.
Know when Siyuan gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
DescriptionGitHub Advisory
SiYuan is a personal knowledge management system. In versions 3.6.0 and below, SanitizeSVG has an incomplete blocklist - it blocks data:text/html and data:image/svg+xml in href attributes but misses data:text/xml and data:application/xml, both of which can render SVG with JavaScript execution. The unauthenticated /api/icon/getDynamicIcon endpoint serves user-controlled input (via the content parameter) directly into SVG markup using fmt.Sprintf with no escaping, served as Content-Type: image/svg+xml. This creates a click-through XSS: a victim navigates to a crafted URL, sees an SVG with an injected link, and clicking it triggers JavaScript via the bypassed MIME types. The attack requires direct navigation to the endpoint or <object>/<embed> embedding, since <img> tag rendering in the frontend doesn't allow interactive links. This issue has been fixed in version 3.6.1.
Executive ViewAI
SiYuan users are at critical risk of account compromise and data theft through a malicious link attack that executes unauthorized code in their browsers. This vulnerability affects all installations of SiYuan 3.6.0 and below with no available patch, requiring immediate interim protective measures to prevent exploitation.
Deploy Web Application Firewall (WAF) rules to block requests to /api/icon/getDynamicIcon endpoint; implement strict Content Security Policy (CSP) headers preventing inline script execution; restrict SiYuan access to internal networks only via network segmentation; disable SVG icon functionality if operationally feasible; implement user awareness training on avoiding suspicious links; deploy endpoint detection and response (EDR) tools to monitor for malicious script execution; consider disabling the feature until patch availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)GitHub Advisory
Related Vulnerabilities in SiYuan Knowledge Management XSS and Traversal
View all 2SQL injection in SiYuan's fullTextSearchAssetContent endpoint lets unauthenticated attackers and holders of publish Role
Stored cross-site scripting in SiYuan personal knowledge management before 3.7.0 lets an attacker with write access to a
SQL injection in SiYuan personal knowledge management (versions <= v3.7.2) lets attackers pass arbitrary SQL statements
Stored cross-site scripting in SiYuan's attribute-view (database) cell renderer, affecting all versions prior to 3.7.0,
SQL injection in SiYuan personal knowledge-management software (all versions before v3.7.3) lets attackers inject arbitr
A SQL injection vulnerability was discovered in Siyuan 3.1.11 in /getHistoryItems. Rated critical severity (CVSS 9.8), t
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the ids array parameter in /batchGetBlockAttrs. R
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the id parameter at /getAssetContent. Rated criti
A SQL injection vulnerability has been identified in Siyuan 3.1.11 via the notebook parameter in /searchHistory. Rated c
SiYuan personal knowledge management system prior to 3.5.4 has a stored XSS vulnerability (CVSS 9.6) that allows code ex
Remote code execution in SiYuan note-taking application (before v3.6.1) allows any malicious Bazaar marketplace package
Origin-validation bypass in SiYuan Note (open-source personal knowledge management) before 3.7.0 lets any installed Chro
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: Critical| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| openSUSE Leap 15.5 | Fixed |
GHSA-4mx9-3c2h-hwhg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB