CVE-2026-40107: CWE-918: Server-Side Request Forgery (SSRF) in siyuan-note siyuan
CVE-2026-40107 is a Server-Side Request Forgery (SSRF) vulnerability in SiYuan personal knowledge management system versions prior to 3. 6. 4. The issue arises because SiYuan configures Mermaid. js with a permissive security level that allows <img> tags with src attributes to bypass sanitization and be injected into SVG elements. When a user opens a note with a malicious Mermaid diagram, the Electron client fetches the specified URL. On Windows, protocol-relative URLs can be interpreted as UNC paths, causing the system to automatically attempt SMB authentication and send the user's NTLMv2 hash to an attacker. This vulnerability has a high severity score of 8. 7 and is fixed in version 3. 6.
AI Analysis
Technical Summary
SiYuan versions before 3.6.4 configure Mermaid.js with securityLevel set to "loose" and htmlLabels enabled, allowing <img> tags with src attributes to survive internal sanitization and be injected into SVG <foreignObject> elements via innerHTML without secondary sanitization. This enables an attacker to craft malicious Mermaid diagrams that cause the Electron client to fetch attacker-controlled URLs. On Windows, protocol-relative URLs (e.g., //attacker.com/image.png) are resolved as UNC paths (\\attacker.com\image.png), triggering automatic SMB authentication attempts that leak the victim's NTLMv2 hash to the attacker. The vulnerability is classified as CWE-918 (SSRF) and has a CVSS 4.0 score of 8.7 (high severity). The issue is fixed in SiYuan version 3.6.4.
Potential Impact
An attacker can craft malicious Mermaid diagrams embedded in notes that cause the victim's Electron client to make unintended network requests. On Windows systems, this can lead to automatic SMB authentication attempts that expose the victim's NTLMv2 hash to the attacker, potentially enabling credential theft or relay attacks. The vulnerability affects all versions of SiYuan prior to 3.6.4. There are no known exploits in the wild at this time.
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. No additional mitigations are specified. Patch status is not explicitly stated beyond the fix in 3.6.4; users should verify upgrade availability from the vendor.
CVE-2026-40107: CWE-918: Server-Side Request Forgery (SSRF) in siyuan-note siyuan
Description
CVE-2026-40107 is a Server-Side Request Forgery (SSRF) vulnerability in SiYuan personal knowledge management system versions prior to 3. 6. 4. The issue arises because SiYuan configures Mermaid. js with a permissive security level that allows <img> tags with src attributes to bypass sanitization and be injected into SVG elements. When a user opens a note with a malicious Mermaid diagram, the Electron client fetches the specified URL. On Windows, protocol-relative URLs can be interpreted as UNC paths, causing the system to automatically attempt SMB authentication and send the user's NTLMv2 hash to an attacker. This vulnerability has a high severity score of 8. 7 and is fixed in version 3. 6.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
SiYuan versions before 3.6.4 configure Mermaid.js with securityLevel set to "loose" and htmlLabels enabled, allowing <img> tags with src attributes to survive internal sanitization and be injected into SVG <foreignObject> elements via innerHTML without secondary sanitization. This enables an attacker to craft malicious Mermaid diagrams that cause the Electron client to fetch attacker-controlled URLs. On Windows, protocol-relative URLs (e.g., //attacker.com/image.png) are resolved as UNC paths (\\attacker.com\image.png), triggering automatic SMB authentication attempts that leak the victim's NTLMv2 hash to the attacker. The vulnerability is classified as CWE-918 (SSRF) and has a CVSS 4.0 score of 8.7 (high severity). The issue is fixed in SiYuan version 3.6.4.
Potential Impact
An attacker can craft malicious Mermaid diagrams embedded in notes that cause the victim's Electron client to make unintended network requests. On Windows systems, this can lead to automatic SMB authentication attempts that expose the victim's NTLMv2 hash to the attacker, potentially enabling credential theft or relay attacks. The vulnerability affects all versions of SiYuan prior to 3.6.4. There are no known exploits in the wild at this time.
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. No additional mitigations are specified. Patch status is not explicitly stated beyond the fix in 3.6.4; users should verify upgrade availability from the vendor.
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/9/2026, 9:35:57 PM
Last updated: 4/9/2026, 10:28:58 PM
Views: 4
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.