{"id":"CVE-2026-32940","state":"PUBLISHED","title":"SiYuan has a SanitizeSVG bypass via data:text/xml in getDynamicIcon (incomplete fix for CVE-2026-29183)","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.","publishedAt":"2026-03-20T03:33:43.069Z","updatedAt":"2026-03-20T19:53:35.414Z","severity":{"score":9.3,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["siyuan-note siyuan"],"affected":[{"vendor":"siyuan-note","product":"siyuan","versions":[{"version":"< 3.6.1","status":"affected"}]}],"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"],"weaknesses":["CWE-79","CWE-184"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/32xxx/CVE-2026-32940.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-32940","state":"PUBLISHED","datePublished":"2026-03-20T03:33:43.069Z","dateUpdated":"2026-03-20T19:53:35.414Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-03-17T00:05:53.283Z"},"containers":{"cna":{"title":"SiYuan has a SanitizeSVG bypass via data:text/xml in getDynamicIcon (incomplete fix for CVE-2026-29183)","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"siyuan-note","product":"siyuan","versions":[{"version":"< 3.6.1","status":"affected"}]}],"references":[{"url":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4mx9-3c2h-hwhg","name":"https://github.com/siyuan-note/siyuan/security/advisories/GHSA-4mx9-3c2h-hwhg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696","name":"https://github.com/siyuan-note/siyuan/commit/d01d561875d4f744e9f6232f1d4831e3642b8696","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-6865-qjcf-286f","name":"https://github.com/advisories/GHSA-6865-qjcf-286f","tags":["x_refsource_MISC"]},{"url":"https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1","name":"https://github.com/siyuan-note/siyuan/releases/tag/v3.6.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":9.3,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-184","lang":"en","description":"CWE-184: Incomplete List of Disallowed Inputs","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-03-20T03:33:43.069Z"},"source":{"advisory":"GHSA-4mx9-3c2h-hwhg","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-20T19:52:53.104887Z","id":"CVE-2026-32940","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-20T19:53:35.414Z"}}]}}}