CVE-2026-29183 — Vulnerability in siyuan-note/siyuan/kernel
SiYuan: Unauthenticated Reflected XSS via SVG Injection in /api/icon/getDynamicIcon Endpoint
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.80%). Schedule for your next planned update.
Does your project use an affected github.com/siyuan-note/siyuan/kernel version?
Paste your go.sum to check it for CVE-2026-29183 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
An unauthenticated reflected XSS vulnerability exists in the dynamic icon API endpoint:
GET /api/icon/getDynamicIcon
When type=8, attacker-controlled content is embedded into SVG output without escaping. Because the endpoint is unauthenticated and returns image/svg+xml, a crafted URL can inject executable SVG/HTML event handlers (for example onerror) and run JavaScript in the SiYuan web origin.
This can be chained to perform authenticated API actions and exfiltrate sensitive data when a logged-in user opens the malicious link.
Details
The issue is caused by unsafe output construction and incomplete sanitization:
-
Endpoint is exposed without auth middleware
- Source: https://github.com/siyuan-note/siyuan/blob/master/kernel/api/router.go#L27-L37
GET /api/icon/getDynamicIconis registered in the unauthenticated section.
-
User input is inserted into SVG via string formatting
- Source: https://github.com/siyuan-note/siyuan/blob/master/kernel/api/icon.go#L115-L175
- Source: https://github.com/siyuan-note/siyuan/blob/master/kernel/api/icon.go#L537-L585
- In
generateTypeEightSVG,%sdirectly injectscontentinto<text>...</text>without XML/HTML escaping.
-
Sanitizer only removes
<script>tags- Source: https://github.com/siyuan-note/siyuan/blob/master/kernel/util/misc.go#L235-L281
RemoveScriptsInSVGremoves<script>nodes, but does not remove dangerous attributes (onerror,onload, etc.) or unsafe elements.
As a result, payloads such as </text><image ... onerror=...><text> survive and execute.
PoC
Minimal browser execution PoC
Open this URL in a browser:
GET /api/icon/getDynamicIcon?type=8&content=%3C%2Ftext%3E%3Cimage%20href%3Dx%20onerror%3Dalert(document.domain)%3E%3C%2Fimage%3E%3Ctext%3E
Example full URL:
http://127.0.0.1:6806/api/icon/getDynamicIcon?type=8&content=%3C%2Ftext%3E%3Cimage%20href%3Dx%20onerror%3Dalert(document.domain)%3E%3C%2Fimage%3E%3Ctext%3E
Expected result:
- JavaScript executes (
alert(document.domain)), confirming reflected XSS.
Authenticated impact demonstration
If a victim is authenticated in the same browser session, JavaScript running in origin can call privileged APIs and exfiltrate returned data.
Impact
This is a reflected XSS in an unauthenticated endpoint, with realistic account/data compromise impact:
- Arbitrary JavaScript execution in SiYuan web origin.
- Authenticated action abuse via same-origin API calls.
- Sensitive data exposure (notes/config/API responses) from victim context.
- Potential chained server-impact actions depending on victim privileges and deployment mode.
Advisory Timeline
- First published March 4, 2026 (267 days ago).
- Last revised April 2, 2026 — 29 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/siyuan-note/siyuan/kernel@v0.0.0-20260304034809-d68bd5a79391
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/siyuan-note/siyuan/kernel Go · Affected: All versions | 0.0.0-20260304034809-d68bd5a79391 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
References
Frequently Asked Questions
- What is CVE-2026-29183?
- SiYuan: Unauthenticated Reflected XSS via SVG Injection in /api/icon/getDynamicIcon Endpoint. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.3/10).
- How do I check if my project is affected by CVE-2026-29183?
- CVE-2026-29183 affects github.com/siyuan-note/siyuan/kernel. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-29183 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 53.1% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-25539CRITICAL
SiYuan has Arbitrary File Write via /api/file/copyFile leading to RCE
- CVE-2026-69083CRITICAL
SiYuan: Unauthenticated SQL execution and REGEXP injection via fullTextSearchAssetContent (publish mode): reader-reachable raw SQL (method 2) and unescaped REGEXP (method 3) on read-write asset-content DB
- CVE-2026-32938CRITICAL
SiYuan Vulnerable to Arbitrary File Read in Desktop Publish Service
- CVE-2026-66394HIGH
SiYuan: Stored and reflected XSS in SiYuan through an SVG sanitizer bypass
- CVE-2026-73608HIGH
SiYuan: getAttributeViewSearchTarget returns database row content to anonymous readers with no publish-access check, reopening the class closed one day earlier at the adjacent route
- CVE-2026-34585HIGH
SiYuan Desktop: Stored XSS in imported .sy.zip content leads to arbitrary command execution
- CVE-2026-72793HIGH
SiYuan: Non-administrator responses from /api/system/getConf omit three secrets that the configuration-export path explicitly strips, disclosing the session-cookie signing key and the OS username to anonymous readers
- CVE-2026-72795HIGH
SiYuan: Embedded (transclusion) block content is returned without publish-access filtering, leaking private and password-protected document content to anonymous readers