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

- Severity: Critical 9.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-03-17T14:08:11.000Z
- Modified: 2026-06-17T10:36:36.113Z
- Also known as: GHSA-4mx9-3c2h-hwhg, GO-2026-4721
- Weaknesses: CWE-79, CWE-184
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- siyuan-note siyuan: < 3.6.1
- github.com/siyuan-note/siyuan (Go): up to 0.0.0-20260313024916-fd6526133bb3; all versions
- b3log siyuan: before 3.6.1

## Every score

- GitHub_M: CVSS: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: CVSS:3.1 9.3 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4mx9-3c2h-hwhg> (exploit, advisory, mitigation, vendor-advisory, web)
- <https://github.com/advisories/GHSA-6865-qjcf-286f> (exploit, advisory, third-party-advisory, web)
- <https://github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696> (fix, patch, web)
- <https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-32940> (advisory)
- <https://github.com/siyuan-note/siyuan> (package)

## Sources

- CVE List: [CVE-2026-32940](https://www.cve.org/CVERecord?id=CVE-2026-32940), CVE Terms of Use, modified 2026-03-20
- GitHub Advisory Database: [GHSA-4mx9-3c2h-hwhg](https://github.com/advisories/GHSA-4mx9-3c2h-hwhg), CC-BY-4.0, modified 2026-04-02
- Go Vulnerability Database: [GO-2026-4721](https://pkg.go.dev/vuln/GO-2026-4721), CC-BY-4.0, modified 2026-03-26
- NVD: [CVE-2026-32940](https://nvd.nist.gov/vuln/detail/CVE-2026-32940), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-32940 · Whole record: https://cve.day/CVE-2026-32940.json · Rebuilt by cve.day 2026-11-25T22:59:16.269Z
