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

- Severity: Medium 6.4 (CVSS:4.0, scored by GitHub_M) `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`
- 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.56%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-10T20:58:36.228Z
- Modified: 2026-06-17T10:34:30.170Z
- Also known as: GHSA-pmc9-f5qr-2pcr, GO-2026-4669
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- siyuan-note siyuan: < 3.5.10
- github.com/siyuan-note/siyuan/kernel (Go): before 0.0.0-20260310025236-297bd526708f
- b3log siyuan: before 3.5.10

## Every score

- GitHub_M: CVSS:4.0 6.4 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- 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-pmc9-f5qr-2pcr> (exploit, advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-31809> (advisory)
- <https://github.com/siyuan-note/siyuan> (package)
- <https://github.com/siyuan-note/siyuan/releases/tag/v3.5.10> (web)

## Sources

- CVE List: [CVE-2026-31809](https://www.cve.org/CVERecord?id=CVE-2026-31809), CVE Terms of Use, modified 2026-03-11
- GitHub Advisory Database: [GHSA-pmc9-f5qr-2pcr](https://github.com/advisories/GHSA-pmc9-f5qr-2pcr), CC-BY-4.0, modified 2026-03-23
- Go Vulnerability Database: [GO-2026-4669](https://pkg.go.dev/vuln/GO-2026-4669), CC-BY-4.0, modified 2026-03-23
- NVD: [CVE-2026-31809](https://nvd.nist.gov/vuln/detail/CVE-2026-31809), Public domain, modified 2026-06-17

---

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