Cyber 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.0030 23th percentile
Risk Priority 64 floored blend · peak EPSS

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

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.
T1659 Content Injection Initial Access
Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.
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.
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.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-25837Shared CWE-79
CVE-2023-22438Shared CWE-79
CVE-2023-27614Shared CWE-79
CVE-2023-47164Shared CWE-79
CVE-2023-49145Shared CWE-79
CVE-2023-47853Shared CWE-79
CVE-2023-28474Shared CWE-79
CVE-2023-37636Shared CWE-79
CVE-2023-1006Shared CWE-79
CVE-2023-5005Shared 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
prevents

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
prevents

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

Knowledge exchange on emerging attack techniques and patches reduces the likelihood that cross-site scripting flaws remain unaddressed in deployed applications.

prevents

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.

prevents

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.

prevents

Application security requirements can mandate complete input validation rules, but the control itself does not prescribe how to build those rules.

prevents

Secure architecture principles include robust input validation design, yet the control is broader than this single weakness.

References