CVE-2026-40107: CWE-918: Server-Side Request Forgery (SSRF) in siyuan-note siyuan
SiYuan is a personal knowledge management system. Prior to 3.6.4, SiYuan configures Mermaid.js with securityLevel: "loose" and htmlLabels: true. In this mode, <img> tags with src attributes survive Mermaid's internal DOMPurify and land in SVG <foreignObject> blocks. The SVG is injected via innerHTML with no secondary sanitization. When a victim opens a note containing a malicious Mermaid diagram, the Electron client fetches the URL. On Windows, a protocol-relative URL (//attacker.com/image.png) resolves as a UNC path (\\attacker.com\image.png). Windows attempts SMB authentication automatically, sending the victim's NTLMv2 hash to the attacker. This vulnerability is fixed in 3.6.4.
AI Analysis
Technical Summary
SiYuan versions before 3.6.4 configure Mermaid.js with insecure settings that allow <img> tags to bypass sanitization and be embedded in SVG foreignObject elements. When a note containing a malicious Mermaid diagram is opened, the Electron client fetches the specified URL. On Windows, protocol-relative URLs are interpreted as UNC paths, triggering automatic SMB authentication and leaking the victim's NTLMv2 hash to the attacker. This constitutes a Server-Side Request Forgery (CWE-918) vulnerability. The issue is resolved in SiYuan 3.6.4.
Potential Impact
An attacker can craft a malicious Mermaid diagram that causes the victim's Electron client to make network requests to attacker-controlled servers. On Windows, this leads to automatic SMB authentication attempts, leaking the victim's NTLMv2 hash to the attacker. This can facilitate credential theft and further attacks. The vulnerability affects all users running vulnerable versions on Windows. No known active exploitation has been reported.
Mitigation Recommendations
This vulnerability is fixed in SiYuan version 3.6.4. Users should upgrade to version 3.6.4 or later to remediate this issue. Since the vendor advisory indicates the fix is available in 3.6.4, applying this update is the recommended mitigation. No additional mitigations are specified.
CVE-2026-40107: CWE-918: Server-Side Request Forgery (SSRF) in siyuan-note siyuan
Description
SiYuan is a personal knowledge management system. Prior to 3.6.4, SiYuan configures Mermaid.js with securityLevel: "loose" and htmlLabels: true. In this mode, <img> tags with src attributes survive Mermaid's internal DOMPurify and land in SVG <foreignObject> blocks. The SVG is injected via innerHTML with no secondary sanitization. When a victim opens a note containing a malicious Mermaid diagram, the Electron client fetches the URL. On Windows, a protocol-relative URL (//attacker.com/image.png) resolves as a UNC path (\\attacker.com\image.png). Windows attempts SMB authentication automatically, sending the victim's NTLMv2 hash to the attacker. This vulnerability is fixed in 3.6.4.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SiYuan versions before 3.6.4 configure Mermaid.js with insecure settings that allow <img> tags to bypass sanitization and be embedded in SVG foreignObject elements. When a note containing a malicious Mermaid diagram is opened, the Electron client fetches the specified URL. On Windows, protocol-relative URLs are interpreted as UNC paths, triggering automatic SMB authentication and leaking the victim's NTLMv2 hash to the attacker. This constitutes a Server-Side Request Forgery (CWE-918) vulnerability. The issue is resolved in SiYuan 3.6.4.
Potential Impact
An attacker can craft a malicious Mermaid diagram that causes the victim's Electron client to make network requests to attacker-controlled servers. On Windows, this leads to automatic SMB authentication attempts, leaking the victim's NTLMv2 hash to the attacker. This can facilitate credential theft and further attacks. The vulnerability affects all users running vulnerable versions on Windows. No known active exploitation has been reported.
Mitigation Recommendations
This vulnerability is fixed in SiYuan version 3.6.4. Users should upgrade to version 3.6.4 or later to remediate this issue. Since the vendor advisory indicates the fix is available in 3.6.4, applying this update is the recommended mitigation. No additional mitigations are specified.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T01:41:38.536Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d818301cc7ad14da2455d6
Added to database: 4/9/2026, 9:20:48 PM
Last enriched: 4/17/2026, 12:18:52 PM
Last updated: 5/25/2026, 2:38:07 AM
Views: 72
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.