Security Digest · Vulnerability record
CVE-2026-32940: SiYuan has a SanitizeSVG bypass via data:text/xml in getDynamicIcon (incomplete fix for CVE-2026-29183)
SiYuan is a personal knowledge management system.
CVSS 9.3 Critical EPSS 0.5% · p40
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.5%, percentile 40: FIRST’s model estimates a 0.5% chance of exploitation activity in the next 30 days, higher than 40% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Needs a user to click or open something. Phishing makes that realistic, but it is not wormable.
- Only applies if your dependency tree includes
github.com/siyuan-note/siyuan(Go) <= 0.0.0-20260313024916-fd6526133bb3, no fixed version listed. Check your lockfile, including transitive dependencies.
What it is
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 / embedding, since tag rendering in the frontend doesn't allow interactive links. This issue has been fixed in version 3.6.1.
From the GitHub advisory
SanitizeSVG bypass via data:text/xml in getDynamicIcon (incomplete fix for CVE-2026-29183)
SanitizeSVG blocks data:text/html and data:image/svg+xml in href attributes but misses data:text/xml and data:application/xml. Both render SVG with onload JavaScript execution (confirmed in Chromium 136, other browsers untested).
/api/icon/getDynamicIcon is unauthenticated and serves SVG as Content-Type: image/svg+xml. The content parameter (type=8) gets embedded into the SVG via fmt.Sprintf with no escaping. The sanitizer catches data:text/html but data:text/xml passes the blocklist -- only three MIME types are checked.
This is a click-through XSS: victim visits the crafted URL, sees an SVG with an injected link, clicks it. If SiYuan renders these icons via tags in the frontend, links aren't interactive there -- the attack needs direct navigation to the endpoint URL or / embedding.
Steps to reproduce
Weakness type: CWE-79, CWE-184.
Product: github.com/siyuan-note/siyuan (Go) · Assigned by: GitHub_M · Published: 2026-03-20
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| Go | github.com/siyuan-note/siyuan | <= 0.0.0-20260313024916-fd6526133bb3 | none listed |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| siyuan-note | siyuan | < 3.6.1 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.3 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| GitHub | 3.1 | 9.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: required (a user must click/open something)
- Scope: changed (can affect other components)
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable no, technical impact partial.
- FIRST EPSS (model of 2026-10-21): 0.48% probability of exploitation activity in the next 30 days; percentile 40.
Timeline
- — GitHub-reviewed advisory GHSA-4mx9-3c2h-hwhg published (critical)
- — CVE record last updated
- — CVE record published by GitHub_M
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-4mx9-3c2h-hwhg github.com
- CVE.org record CVE-2026-32940 cve.org
- NVD entry CVE-2026-32940 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com