The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40107

CVE-2026-40107: SiYuan Information Disclosure Vulnerability

CVE-2026-40107 is an information disclosure vulnerability in SiYuan that exploits Mermaid.js configuration to steal NTLMv2 hashes via UNC paths. This article covers technical details, affected versions, and mitigation.

Published: April 9, 2026

CVE-2026-40107 Overview

SiYuan is a personal knowledge management system that contains a Server-Side Request Forgery (SSRF) vulnerability in its Mermaid.js diagram rendering configuration. Prior to version 3.6.4, the application configures Mermaid.js with securityLevel: "loose" and htmlLabels: true, which allows <img> tags with src attributes to survive Mermaid's internal DOMPurify sanitization and land in SVG <foreignObject> blocks. When a victim opens a note containing a malicious Mermaid diagram on Windows, protocol-relative URLs are resolved as UNC paths, triggering automatic SMB authentication and exposing the victim's NTLMv2 hash to attackers.

Critical Impact

Attackers can steal NTLMv2 authentication hashes from Windows users by crafting malicious Mermaid diagrams, enabling credential relay attacks or offline password cracking.

Affected Products

  • SiYuan versions prior to 3.6.4
  • SiYuan Electron client on Windows

Discovery Timeline

  • 2026-04-09 - CVE CVE-2026-40107 published to NVD
  • 2026-04-09 - Last updated in NVD database

Technical Details for CVE-2026-40107

Vulnerability Analysis

This vulnerability stems from an insecure configuration of the Mermaid.js diagramming library within SiYuan's Electron-based client. The root cause is the combination of securityLevel: "loose" and htmlLabels: true settings, which weakens the library's built-in protections against HTML injection.

When Mermaid.js processes diagrams with these settings, HTML elements including <img> tags pass through DOMPurify sanitization intact. These elements are then placed within SVG <foreignObject> blocks. The critical issue is that the resulting SVG content is injected into the DOM via innerHTML without any secondary sanitization step.

On Windows systems, this creates a particularly dangerous attack surface. When a malicious diagram contains an image reference using a protocol-relative URL (e.g., //attacker.com/image.png), Windows interprets this as a UNC path (\\attacker.com\image.png). The operating system then automatically attempts SMB authentication to the attacker-controlled server, transmitting the victim's NTLMv2 hash without any user interaction beyond opening the malicious note.

Root Cause

The vulnerability is classified under CWE-918 (Server-Side Request Forgery). The insecure Mermaid.js configuration allows untrusted content to trigger outbound network requests from the application. The lack of secondary sanitization on SVG content injected via innerHTML compounds the issue, permitting attacker-controlled URLs to reach the rendering engine.

Attack Vector

The attack is network-based and requires no authentication or privileges from the attacker's perspective. An attacker can craft a malicious Mermaid diagram containing a specially formatted <img> tag with a protocol-relative URL pointing to an attacker-controlled SMB server. When shared via SiYuan's note-sharing mechanisms or imported into a victim's knowledge base, opening the note triggers the credential theft.

The attack flow proceeds as follows: the malicious diagram passes through Mermaid.js processing, the <img> tag survives sanitization, the SVG is rendered via innerHTML, the Electron client attempts to fetch the image resource, and Windows automatically sends NTLMv2 credentials to the attacker's server.

Detection Methods for CVE-2026-40107

Indicators of Compromise

  • Outbound SMB traffic (TCP port 445) to external IP addresses or suspicious domains
  • Network connections to protocol-relative URLs or UNC paths from the SiYuan application process
  • Unusual authentication events logged in Windows Security Event logs (Event ID 4624/4625 with network logon type)

Detection Strategies

  • Monitor for outbound SMB connections originating from Electron-based applications
  • Implement network-level detection for NTLM authentication attempts to non-corporate IP ranges
  • Deploy endpoint detection rules for SiYuan processes initiating connections to unknown external hosts

Monitoring Recommendations

  • Enable Windows Event logging for authentication events and correlate with SiYuan process activity
  • Configure firewall rules to alert on outbound SMB traffic to non-whitelisted destinations
  • Review shared SiYuan notes for suspicious Mermaid diagram content containing protocol-relative URLs

How to Mitigate CVE-2026-40107

Immediate Actions Required

  • Upgrade SiYuan to version 3.6.4 or later immediately
  • Block outbound SMB traffic (TCP 445) at the network perimeter for non-essential systems
  • Review recently imported or shared notes for malicious Mermaid diagram content

Patch Information

The vulnerability is fixed in SiYuan version 3.6.4. Users should upgrade to this version or later to remediate the vulnerability. For detailed information about the security fix, refer to the GitHub Security Advisory.

Workarounds

  • Block outbound SMB traffic at the host or network firewall level to prevent credential theft even if a malicious diagram is opened
  • Avoid opening untrusted or externally-sourced SiYuan notes until the application is upgraded
  • Consider disabling Mermaid diagram rendering temporarily if patch deployment is delayed
bash
# Windows firewall rule to block outbound SMB traffic
netsh advfirewall firewall add rule name="Block Outbound SMB" dir=out action=block protocol=tcp remoteport=445

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechSiyuan

  • SeverityHIGH

  • CVSS Score8.7

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-918
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33669: SiYuan Information Disclosure Vulnerability

  • CVE-2026-32747: SiYuan Information Disclosure Vulnerability

  • CVE-2026-39846: SiYuan Electron Desktop Client RCE Flaw

  • CVE-2026-34453: SiYuan Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English