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.
Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.
CVE-2026-29183 has a CVSS score of 9.3 (Critical). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260304034809-d68bd5a79391); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-29183? CVE-2026-29183 is a critical-severity cross-site scripting (XSS) vulnerability in github.com/siyuan-note/siyuan/kernel (go), affecting versions < 0.0.0-20260304034809-d68bd5a79391. It is fixed in 0.0.0-20260304034809-d68bd5a79391. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
- How severe is CVE-2026-29183? CVE-2026-29183 has a CVSS score of 9.3 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/siyuan-note/siyuan/kernel are affected by CVE-2026-29183? github.com/siyuan-note/siyuan/kernel (go) versions < 0.0.0-20260304034809-d68bd5a79391 is affected.
- Is there a fix for CVE-2026-29183? Yes. CVE-2026-29183 is fixed in 0.0.0-20260304034809-d68bd5a79391. Upgrade to this version or later.
- Is CVE-2026-29183 exploitable, and should I be worried? Whether CVE-2026-29183 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-29183 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-29183? Upgrade
github.com/siyuan-note/siyuan/kernelto 0.0.0-20260304034809-d68bd5a79391 or later.