Security Resilience

CVE-2026-32940

XSS in B3Log Siyuan ≤ 3.6.1

Public PoCXSS
Published
20 March 2026
Modified
23 March 2026
Patch / advisory
CVSS Score v3.1 9.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
EPSS Score 0.0048 40th percentile
Risk Priority 65 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

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 Browser Session Hijacking (T1185); ranked at the 40th 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

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

T1185 Browser Session Hijacking Collection
Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
T1027.017 SVG Smuggling Stealth
Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign SVG files.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1204.001 Malicious Link Execution
An adversary may rely upon a user clicking a malicious link in order to gain execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-32747Same product: B3Log Siyuan
CVE-2026-105650Shared CWE-184, CWE-79
CVE-2026-54070Shared CWE-184, CWE-79
CVE-2026-84370Shared CWE-184, CWE-79
CVE-2026-45753Shared CWE-184, CWE-79
CVE-2026-59929Shared CWE-184, CWE-79
CVE-2026-49825Shared CWE-184, CWE-79
CVE-2026-63671Shared CWE-184, CWE-79
CVE-2026-73650Shared CWE-184, CWE-79
CVE-2026-33628Shared CWE-184, CWE-79

Affected Assets

b3log
siyuan
≤ 3.6.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 2 hardening rules · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)
  • V3.5.2
  • V4.4.2
  • V16.2.5
  • V1.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.

PR.PS-06 mostly match
blocks

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).

PR.PS-02 partial match
blocks

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.

finds

Secure-coding testing and automated code-analysis tools are applied to detect improper neutralization of script-related content during web-page generation.

prevents

Secure-coding standards, SAST scans and removal of insecure code samples together eliminate the failure to neutralize script content that produces cross-site scripting flaws.

References