<?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>Siyuan-Note/Siyuan/Kernel — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/siyuan-note/siyuan/kernel/</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>Sat, 09 May 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/siyuan-note/siyuan/kernel/feed.xml" rel="self" type="application/rss+xml"/><item><title>SiYuan Stored XSS via Attribute View Name Leads to Electron Renderer RCE (CVE-2026-44670)</title><link>https://feed.craftedsignal.io/briefs/2026-05-siyuan-xss-rce/</link><pubDate>Sat, 09 May 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-siyuan-xss-rce/</guid><description>A stored cross-site scripting (XSS) vulnerability exists in SiYuan due to the kernel storing Attribute View (AV) names without HTML escaping, allowing a malicious actor to inject arbitrary HTML which leads to Node.js code execution due to insecure Electron configuration, resulting in remote code execution (RCE).</description><content:encoded><![CDATA[<p>SiYuan is vulnerable to a stored cross-site scripting (XSS) vulnerability (CVE-2026-44670) due to improper handling of Attribute View (AV) names. The application&rsquo;s kernel stores AV names without HTML escaping, and a rendering template uses raw string replacement to embed the name in HTML before pushing it to clients via WebSocket. Multiple client paths consume this value without escaping, leading to HTML injection. The main BrowserWindow runs with <code>nodeIntegration:true</code>, <code>contextIsolation:false</code>, and <code>webSecurity:false</code>, exacerbating the issue and allowing for Node.js code execution from injected HTML. This vulnerability affects SiYuan versions up to and including 3.6.5 and can be exploited through various vectors, including browser extensions, shared <code>.sy.zip</code> files, and sync replication from compromised devices, as well as Bazaar templates.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious Attribute View (AV) name containing a JavaScript payload, such as <code>&lt;img src=x onerror=&quot;require('child_process').exec(process.platform==='win32'?'calc.exe':process.platform==='darwin'?'open -a Calculator':'xcalc')&quot;&gt;</code>.</li>
<li>The attacker uses the SiYuan UI or API endpoint <code>/api/transactions</code> with the <code>setAttrViewName</code> action to set the crafted AV name.</li>
<li>The kernel stores the malicious AV name without proper HTML escaping in the <code>data/storage/av/&lt;id&gt;.json</code> file.</li>
<li>When a user opens a document bound to the malicious AV, the AV name is retrieved from storage and rendered into the user interface via WebSocket updates or direct rendering during document load.</li>
<li>The vulnerable code paths at <code>app/src/protyle/render/av/render.ts:120</code>, <code>app/src/protyle/header/Title.ts:396-403</code>, or <code>app/src/protyle/wysiwyg/transaction.ts:549-562,659</code> inject the unescaped AV name into the DOM.</li>
<li>The browser executes the injected JavaScript payload due to the lack of context isolation and disabled web security.</li>
<li>The payload executes arbitrary commands on the victim&rsquo;s machine. For example, it launches the calculator application using <code>require('child_process').exec()</code>.</li>
<li>The attacker achieves remote code execution (RCE) on the victim&rsquo;s machine with the user&rsquo;s privileges.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability leads to remote code execution (RCE) on the victim&rsquo;s desktop. The payload is persistent, surviving restarts and syncing across devices. The vulnerability affects all user roles (Administrator, Editor, Reader, and publish-service Visitor). After gaining RCE, an attacker can perform various malicious activities, including full filesystem read, persistence, and cloud-account pivot. The vulnerability can be exploited through browser extensions, shared <code>.sy.zip</code> files, Bazaar templates, sync peers, and co-authors on a shared workspace.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the suggested fixes from the advisory to mitigate the vulnerability in the SiYuan kernel. Specifically, use <code>template.HTMLEscapeString(nodeAvName)</code> for the <code>${avName}</code> substitution in <code>kernel/model/attribute_view.go</code>.</li>
<li>Escape the <code>av-names</code> value with <code>Lute.EscapeHTMLStr</code> in <code>transaction.ts:559</code> to prevent HTML injection via WebSocket updates.</li>
<li>Use <code>Lute.EscapeHTMLStr(data.name)</code> for both <code>data-title=</code> and the text content in <code>render.ts:120</code> to prevent HTML injection during AV rendering.</li>
<li>Escape <code>item.name</code> via <code>Lute.EscapeHTMLStr</code> and <code>item.id</code> via <code>escapeAttr</code> in <code>Title.ts:396</code> during document title rendering.</li>
<li>Deploy the Sigma rule &ldquo;Detect SiYuan XSS via Attribute View Name&rdquo; to detect exploitation attempts by monitoring for the <code>setAttrViewName</code> action with suspicious HTML payloads.</li>
<li>As a defense-in-depth measure, switch the main BrowserWindow to <code>contextIsolation: true</code> with a preload bridge to limit the impact of potential future renderer XSS vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>xss</category><category>rce</category><category>siyuan</category><category>cve-2026-44670</category></item></channel></rss>