<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Github.com/Siyuan-Note/Siyuan/Kernel (&lt;= 0.0.0-20260421031503-96dfe0bea474) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/github.com/siyuan-note/siyuan/kernel--0.0.0-20260421031503-96dfe0bea474/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 13 May 2026 15:35:14 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/github.com/siyuan-note/siyuan/kernel--0.0.0-20260421031503-96dfe0bea474/feed.xml" rel="self" type="application/rss+xml"/><item><title>SiYuan Bazaar Marketplace Stored XSS Leads to Electron RCE</title><link>https://feed.craftedsignal.io/briefs/2026-05-siyuan-bazaar-xss/</link><pubDate>Wed, 13 May 2026 15:35:14 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-siyuan-bazaar-xss/</guid><description>SiYuan's Bazaar marketplace is vulnerable to stored cross-site scripting (XSS) via unescaped package metadata, leading to arbitrary OS command execution in the desktop Electron client.</description><content:encoded><![CDATA[<p>SiYuan&rsquo;s Bazaar (community marketplace) renders the <code>name</code> and <code>version</code> fields of a package&rsquo;s <code>plugin.json</code> into the Settings → Marketplace UI without HTML escaping, leading to a stored XSS vulnerability. The kernel-side helper <code>sanitizePackageDisplayStrings</code> in <code>kernel/bazaar/package.go</code> HTML-escapes only <code>Author</code>, <code>DisplayName</code>, and <code>Description</code> — <code>Name</code> and <code>Version</code> flow through to the renderer raw. Because the desktop client is built on Electron with <code>nodeIntegration: true</code>, <code>contextIsolation: false</code>, and <code>webSecurity: false</code>, the resulting cross-site scripting executes in a renderer with full access to Node.js APIs, escalating directly to arbitrary OS command execution under the victim&rsquo;s account. The trigger requires merely opening Settings → Marketplace → Downloaded → Plugins. This vulnerability affects SiYuan kernel versions up to and including <code>0.0.0-20260421031503-96dfe0bea474</code>.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious plugin manifest (<code>plugin.json</code>) containing a payload in the <code>name</code> or <code>version</code> fields, such as <code>&lt;img src=x onerror=&quot;require('child_process').exec('...')&quot;&gt;</code>.</li>
<li>The attacker submits the malicious plugin manifest to the SiYuan Bazaar marketplace, or places it in the local plugins directory.</li>
<li>The SiYuan kernel retrieves and stores the plugin manifest without properly sanitizing the <code>name</code> and <code>version</code> fields.</li>
<li>A user opens the SiYuan application and navigates to Settings → Marketplace → Downloaded → Plugins.</li>
<li>The SiYuan frontend fetches the plugin metadata, including the unsanitized <code>name</code> and <code>version</code> fields, from the backend.</li>
<li>The frontend substitutes the <code>name</code> or <code>version</code> fields into the HTML of the marketplace card list via <code>${item.preferredName}</code>, <code>${data.name}</code>, or <code>v${data.version}</code>.</li>
<li>The browser parses the malicious HTML, triggering the <code>onerror</code> event of the injected <code>&lt;img&gt;</code> tag.</li>
<li>The <code>onerror</code> handler executes <code>require('child_process').exec(...)</code>, leading to arbitrary OS command execution under the user&rsquo;s account.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in arbitrary OS command execution on the victim&rsquo;s machine with the privileges of the user running the SiYuan application. This allows attackers to steal sensitive information, install malware, or perform other malicious actions. The vulnerability is triggered by simply viewing the marketplace listing, making it a zero-click exploit. The injected payload is visually undetectable due to the use of <code>display:none</code> style, making the attack stealthy. The Bazaar marketplace serves as a low-friction delivery channel.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect SiYuan Bazaar XSS via Malicious Plugin Name</code> to detect exploitation attempts by monitoring for img tags with onerror attributes in bazaar package names.</li>
<li>Deploy the Sigma rule <code>Detect SiYuan Bazaar XSS via Malicious Plugin Version</code> to detect exploitation attempts by monitoring for img tags with onerror attributes in bazaar package versions.</li>
<li>Upgrade to a patched version of SiYuan that includes proper HTML escaping of package metadata to address CVE-2026-45375.</li>
<li>Implement the suggested fix by extending the kernel allowlist in <code>kernel/bazaar/package.go</code> to escape the <code>Name</code>, <code>Version</code>, and <code>Keywords</code> fields.</li>
<li>Apply the secondary fix by calling <code>sanitizePackageDisplayStrings</code> from <code>kernel/bazaar/bazaar.go:48</code> to ensure consistent sanitization.</li>
<li>Harden the Electron renderer by enabling <code>contextIsolation: true</code> in <code>app/electron/main.js</code> to limit the impact of future XSS vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">threat</category><category>xss</category><category>rce</category><category>electron</category><category>siyuan</category></item></channel></rss>