<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/siyuan/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 22 Apr 2026 20:55:31 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/siyuan/feed.xml" rel="self" type="application/rss+xml"/><item><title>SiYuan Path Traversal via Double URL Encoding in `/export/` Endpoint</title><link>https://feed.craftedsignal.io/briefs/2026-04-siyuan-path-traversal/</link><pubDate>Wed, 22 Apr 2026 20:55:31 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-siyuan-path-traversal/</guid><description>SiYuan is vulnerable to path traversal via double URL encoding in the `/export/` endpoint, bypassing an incomplete fix for CVE-2026-30869; an authenticated attacker can exploit this vulnerability to traverse directories and read arbitrary workspace files, including the SQLite database (`siyuan.db`), kernel log, and user documents due to a redundant `url.PathUnescape()` call in `serveExport()`.</description><content:encoded><![CDATA[<p>SiYuan is vulnerable to a path traversal vulnerability (CVE-2026-30869) due to a redundant <code>url.PathUnescape()</code> call within the <code>serveExport()</code> function. The vulnerability exists in versions prior to 3.6.5. This flaw allows an authenticated attacker, including low-privilege users with Publish/Reader roles, to bypass intended security restrictions and access sensitive files stored within the SiYuan workspace. The initial fix attempted with <code>IsSensitivePath()</code> proved insufficient as it did not address the core issue of double URL decoding. An attacker can exploit this vulnerability by using double URL encoded characters in a crafted HTTP request, allowing them to read arbitrary files such as the complete SQLite document database (<code>siyuan.db</code>), kernel logs, and other critical files.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An authenticated attacker sends a GET request to the <code>/export/</code> endpoint with a double URL encoded path, such as <code>/export/%252e%252e/siyuan.db</code>.</li>
<li>The Go HTTP server decodes the initial layer of URL encoding, transforming <code>%25</code> into <code>%</code>, resulting in a path like <code>/export/%2e%2e/siyuan.db</code>.</li>
<li>The path cleaner does not recognize <code>%2e%2e</code> as directory traversal, so it passes through.</li>
<li>The <code>serveExport()</code> function then calls <code>url.PathUnescape()</code> on the path, decoding <code>%2e%2e</code> into <code>..</code>.</li>
<li>The <code>filepath.Join()</code> function concatenates the <code>exportBaseDir</code> with the now decoded path, e.g., <code>&lt;workspace&gt;/../siyuan.db</code>.</li>
<li>The <code>IsSensitivePath()</code> check fails to block the request because it doesn&rsquo;t account for the decoded path or specific database files in the <code>temp/</code> directory.</li>
<li>The attacker successfully retrieves the contents of the <code>siyuan.db</code> file, which contains the complete document database.</li>
<li>The attacker repeats the process to access other sensitive files within the workspace, such as <code>siyuan.log</code>, <code>blocktree.db</code>, and <code>asset_content.db</code>.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to exfiltrate sensitive data, including the entire SQLite document database, potentially containing all user documents, attributes, and search indexes. The attacker can also access the kernel log, which may contain internal server paths, versions, configuration details, and error messages. This information disclosure could lead to further compromise of the system. While the number of victims is unknown, any SiYuan instance running a version prior to 3.6.5 is potentially vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade SiYuan to version 3.6.5 or later to remediate the vulnerability.</li>
<li>Deploy the provided Sigma rule <code>Detect SiYuan Path Traversal Attempt</code> to detect attempts to exploit this vulnerability by monitoring for double URL encoded characters in requests to the <code>/export/</code> endpoint.</li>
<li>Monitor web server logs for requests to the <code>/export/</code> endpoint containing <code>%252e%252e</code> to identify potential exploitation attempts.</li>
<li>Consider implementing a more robust path validation mechanism within the <code>serveExport()</code> function that properly handles URL decoding and directory traversal attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>web-application</category><category>siYuan</category></item></channel></rss>