Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/siyuan-note/siyuan/kernel
  4. ›
  5. CVE-2026-40107

CVE-2026-40107: SiYuan Affected by Zero-Click NTLM Hash Theft and Blind SSRF via Mermaid Diagram Rendering

April 10, 2026

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.

References

  • github.com/advisories/GHSA-w95v-4h65-j455
  • github.com/siyuan-note/siyuan
  • github.com/siyuan-note/siyuan/security/advisories/GHSA-w95v-4h65-j455
  • nvd.nist.gov/vuln/detail/CVE-2026-40107

Code Behaviors & Features

Detect and mitigate CVE-2026-40107 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20260407035653-2f416e5253f1

Fixed versions

  • 0.0.0-20260407035653-2f416e5253f1

Solution

Upgrade to version 0.0.0-20260407035653-2f416e5253f1 or above.

Impact 9.3 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

go/github.com/siyuan-note/siyuan/kernel/CVE-2026-40107.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:19:05 +0000.