Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:NSummary
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 Browser Session Hijacking (T1185); ranked at the 23th 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 map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
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.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-13523
Vulnerability Data
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
- 2 hardening rules · 1 OS baseline
V3.5.2V4.4.2V16.2.5V1.1.2
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and evaluation can discover missing or incorrect input neutralization through targeted web-application tests.
Input validation directly enforces neutralization of untrusted data before it reaches web output generation.
Output filtering can catch or sanitize unneutralized script content before it is served to users.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly target introduction of XSS via coding standards/testing (mostly), yet the single broad outcome leaves many specific neutralization vectors unaddressed (partial).
Patching and EOL replacement can remediate known XSS instances in libraries or frameworks (partial) but do nothing to enforce input neutralization in application code (none).
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Secure-coding testing and automated code-analysis tools are applied to detect improper neutralization of script-related content during web-page generation.
Knowledge exchange on emerging attack techniques and patches reduces the likelihood that cross-site scripting flaws remain unaddressed in deployed applications.
Operational indicators of compromise for web-application attacks can be incorporated into WAF or input-filtering rules, lowering the likelihood that unsanitized data reaches the browser.
Requiring language-specific secure-coding standards and automated scanning during the SDLC catches missing output encoding or improper neutralization of untrusted data before the software reaches production.
Application security requirements can mandate complete input validation rules, but the control itself does not prescribe how to build those rules.
Secure architecture principles include robust input validation design, yet the control is broader than this single weakness.