CVE-2026-32940
Published: 20 March 2026
Summary
CVE-2026-32940 is a critical-severity Cross-site Scripting (CWE-79) vulnerability in B3Log Siyuan. Its CVSS base score is 9.3 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 24.8th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
The strongest mitigations our analysis identified are NIST 800-53 SI-10 (Information Input Validation) and SI-15 (Information Output Filtering).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Directly mandates filtering SVG output containing user-controlled input to block JavaScript execution via bypassed data MIME types, preventing XSS.
Requires validation of the user-controlled content parameter to reject malicious payloads before insertion into SVG markup, addressing the incomplete SanitizeSVG blocklist.
Ensures timely remediation of the flaw through patching, as demonstrated by the fix in SiYuan v3.6.1, preventing exploitation of the unescaped fmt.Sprintf output.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
The unauthenticated /api/icon/getDynamicIcon endpoint and incomplete SVG sanitization directly enable exploitation of a public-facing web application (T1190). Successful abuse results in arbitrary JavaScript execution within the victim's browser context (T1059.007), enabling impacts such as session hijacking.
NVD Description
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.…
more
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.
Deeper analysisAI
CVE-2026-32940 affects SiYuan, a personal knowledge management system, in versions 3.6.0 and below. The vulnerability stems from an incomplete blocklist in the SanitizeSVG function, which blocks data:text/html and data:image/svg+xml in href attributes but misses data:text/xml and data:application/xml; both overlooked types can render SVG content with JavaScript execution. Additionally, the unauthenticated /api/icon/getDynamicIcon endpoint processes user-controlled input from the content parameter and inserts it directly into SVG markup using fmt.Sprintf without escaping, serving the response with Content-Type: image/svg+xml. This flaw, published on 2026-03-20, is rated 9.3 on CVSS 3.1 (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N) and maps to CWE-79 (Cross-site Scripting) and CWE-184 (Incomplete List of Disallowed Inputs).
An unauthenticated attacker can exploit this via a click-through cross-site scripting (XSS) attack by crafting a URL to the /api/icon/getDynamicIcon endpoint with malicious content. A victim must navigate directly to the URL or embed it via <object> or <embed> tags, as <img> tag rendering in the frontend does not support interactive links; upon viewing the resulting SVG image, the victim sees an injected link and, upon clicking it, triggers JavaScript execution through the bypassed data MIME types. Successful exploitation enables high confidentiality and integrity impacts, such as session hijacking or data theft, though it requires user interaction and changes the scope.
Advisories and patches confirm the issue was addressed in SiYuan version 3.6.1. Relevant GitHub Security Advisories (GHSA-6865-qjcf-286f and GHSA-4mx9-3c2h-hwhg) detail the flaw, with the fixing commit at https://github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696 and the release at https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1; practitioners should upgrade to 3.6.1 or later to mitigate.
Details
- CWE(s)