CVE-2026-32940: b3log siyuan Cross-site Scripting
Vulnerability summary
CVE-2026-32940 is a critical (CVSS 9.3) Cross-site Scripting vulnerability in b3log siyuan. EPSS estimates a 0.48% chance of exploitation in the next 30 days, higher than 39.7% of scored vulnerabilities. 2 public exploits are recorded.
Advisory lineage
Upstream 0 · Downstream 2 · Related 3Timeline
- 20-03-2026PublishedVulnerability first disclosed.
- 20-03-2026Last modifiedVulnerability information updated.
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. 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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · GoEcosystem advisory · calculated9.3CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
0.48%
Chance of exploitation in the next 30 days
Percentile
40%
Versus all other CVEs
30-day change
+0.17 pp
From 0.30% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
2 foundSiyuan
Maturity: poc
Ghsa 6865 Qjcf 286F
Maturity: poc
Weaknesses
CWE · root cause- CWE-79Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-184Incomplete List of Disallowed InputsThe product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
Affected systems
B3log1 product
- siyuan< 3.6.1
Github.com/siyuan-note1 product
- siyuan≤ 0.0.0-20260313024916-fd6526133bb3 | All versions (No fix recorded)
Siyuan-note1 product
- siyuan< 3.6.1
3 vendors · 3 products
References
6 links- github.com/siyuan-note/siyuan/security/advisories/GHSA-4mx9-3c2h-hwhgX Refsource CONFIRMWEBAdvisoryExploitMitigationVendor Advisory
- github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696X Refsource MISCWEBFIXPatch