Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-40107: CWE-918: Server-Side Request Forgery (SSRF) in siyuan-note siyuan

0
High
VulnerabilityCVE-2026-40107cvecve-2026-40107cwe-918
Published: Thu Apr 09 2026 (04/09/2026, 21:03:58 UTC)
Source: CVE Database V5
Vendor/Project: siyuan-note
Product: 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

AILast updated: 04/17/2026, 12:18:52 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses