<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/siyuan-note/</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:36:24 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/siyuan-note/feed.xml" rel="self" type="application/rss+xml"/><item><title>SiYuan Publish-Mode Reader Configuration and Index Mutation Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-05-siyuan-publish-mode-reader-mutation/</link><pubDate>Wed, 13 May 2026 15:36:24 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-siyuan-publish-mode-reader-mutation/</guid><description>SiYuan publish-mode Reader can mutate Conf and SQL index via 8 ungated APIs, leading to configuration changes, denial of service, data corruption, and information disclosure by manipulating cloud sync intervals, graph configurations, SQL block content, and recent-documents lists.</description><content:encoded><![CDATA[<p>SiYuan is vulnerable to unauthorized modification of server-side state due to missing authorization checks on eight API endpoints: <code>/api/graph/getGraph</code>, <code>/api/graph/getLocalGraph</code>, <code>/api/sync/setSyncInterval</code>, <code>/api/storage/updateRecentDocViewTime</code>, <code>/api/storage/updateRecentDocCloseTime</code>, <code>/api/storage/updateRecentDocOpenTime</code>, <code>/api/storage/batchUpdateRecentDocCloseTime</code>, and <code>/api/search/updateEmbedBlock</code>. These endpoints lack <code>model.CheckAdminRole</code> and <code>model.CheckReadonly</code> checks, allowing any authenticated user, including publish-service <code>RoleReader</code> and <code>RoleEditor</code> with <code>Editor.ReadOnly = true</code>, to write to the server. This can lead to atomic rewrites of the <code>&lt;workspace&gt;/conf/conf.json</code> file and modifications to the SQL index. This vulnerability affects all SiYuan versions up to and including v3.6.5. This is similar to previously patched vulnerabilities GHSA-6r88-8v7q-q4p2 and GHSA-4j3x-hhg2-fm2x, indicating a recurring pattern of missing authorization checks.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker authenticates to the SiYuan application, obtaining a JWT that passes <code>CheckAuth</code>. This can be as a publish-service <code>RoleReader</code> (anonymous publish visitor) or a <code>RoleEditor</code> against a workspace where <code>Editor.ReadOnly = true</code>.</li>
<li>Attacker sends a POST request to <code>/api/sync/setSyncInterval</code> with a crafted JSON payload containing a malicious interval value (e.g., 30 or 43200).</li>
<li>The server receives the request and updates the <code>Conf.Sync.Interval</code> value based on the attacker-provided interval, persisting the change to <code>conf.json</code> via <code>Conf.Save()</code>.</li>
<li>Attacker sends a POST request to <code>/api/graph/getGraph</code> with a crafted JSON payload containing a malicious graph configuration.</li>
<li>The server receives the request and overwrites <code>model.Conf.Graph.Global</code> from the attacker-supplied JSON and persists the entire workspace <code>conf.json</code>.</li>
<li>Attacker sends a POST request to <code>/api/search/updateEmbedBlock</code> with a crafted JSON payload, specifying an embed-block ID and malicious content.</li>
<li>The server receives the request and updates the <code>blocks</code> table in the SQL database, rewriting the <code>content</code> column for the specified embed-block ID.</li>
<li>Other users accessing the SiYuan application will now see the poisoned content when the embedded block is displayed or searched.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows unauthorized users to modify the SiYuan configuration and data, potentially leading to denial-of-service, data corruption, and information disclosure. Specifically, attackers can:</p>
<ol>
<li>Cause a denial-of-service by setting a minimal cloud sync interval (30 seconds), causing excessive battery drain and bandwidth consumption on connected clients.</li>
<li>Effectively pause cloud sync by setting a maximal sync interval (43200 seconds), increasing the risk of data divergence.</li>
<li>Corrupt graph rendering by providing extreme values for <code>maxBlocks</code>, <code>minRefs</code>, or <code>nodeSize</code> in the <code>/api/graph/getGraph</code> or <code>/api/graph/getLocalGraph</code> endpoints.</li>
<li>Poison search results by injecting malicious content into embed blocks via the <code>/api/search/updateEmbedBlock</code> endpoint.</li>
<li>Manipulate the admin&rsquo;s recently-opened-documents list, potentially disclosing information about publish-private notebooks via the <code>updateRecentDoc*</code> endpoints.</li>
</ol>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Detect SiYuan Unauthorized Sync Interval Modification&rdquo; to monitor for unauthorized modifications to the sync interval using the <code>/api/sync/setSyncInterval</code> endpoint.</li>
<li>Deploy the Sigma rule &ldquo;Detect SiYuan Unauthorized Graph Configuration Modification&rdquo; to monitor for unauthorized modifications to the graph configuration using the <code>/api/graph/getGraph</code> endpoint.</li>
<li>Apply the patch described in the advisory by adding <code>model.CheckAdminRole</code> and <code>model.CheckReadonly</code> to the affected <code>ginServer.Handle</code> calls in <code>kernel/api/router.go</code> to restrict access to these API endpoints to authorized users.</li>
<li>Monitor web server logs for POST requests to the listed API endpoints (<code>/api/graph/getGraph</code>, <code>/api/graph/getLocalGraph</code>, <code>/api/sync/setSyncInterval</code>, <code>/api/storage/updateRecentDocViewTime</code>, <code>/api/storage/updateRecentDocCloseTime</code>, <code>/api/storage/updateRecentDocOpenTime</code>, <code>/api/storage/batchUpdateRecentDocCloseTime</code>, <code>/api/search/updateEmbedBlock</code>) without corresponding administrative actions.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>siyuan</category><category>misconfiguration</category><category>unauthorized_access</category><category>data_manipulation</category></item></channel></rss>