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.
Published: 2026-04-09
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Credential Theft via NTLM Hash Theft
Action: Patch
AI Analysis

Impact

SiYuan, a personal knowledge management system, allows Mermaid diagrams to be rendered with settings that enable HTML labels and a ‘loose’ security level. In this configuration <img> tags can escape the internal DOMPurify filter and end up inside SVG foreignObject blocks. The SVG content is injected into the page using innerHTML without additional sanitization, leading to a zero‑click vulnerability. When a user opens a note containing a malicious Mermaid diagram, the Electron client automatically fetches the image URL. On Windows, a protocol‑relative URL such as //attacker.com/image.png resolves to a UNC path, which triggers SMB authentication and causes Windows to send the victim’s NTLMv2 hash to the target. The attacker can capture this credential and later use it in pass‑the‑hash attacks or other credential‑based exploitation scenarios.

Affected Systems

The issue affects the SiYuan application version 3.6.3 and earlier. The vulnerable component is the Electron client running on Windows operating systems. The affected environment includes any user who opens a note containing a Mermaid diagram with an image reference that can resolve to a UNC path. The vendor product is Siyuan-Note Siyuan.

Risk and Exploitability

The CVSS score for this vulnerability is 8.7, indicating high severity. While an EPSS score is not provided, the zero‑click nature and the ability to exfiltrate NTLM hashes without user interaction suggest a high likelihood of exploitation in environments where users work with potentially untrusted content. The vulnerability is not currently listed in the CISA KEV catalog. Attacks require only the user to open a malicious note; no additional permissions or input are necessary beyond normal use of the application.

Generated by OpenCVE AI on April 9, 2026 at 22:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade SiYuan to version 3.6.4 or later.

Generated by OpenCVE AI on April 9, 2026 at 22:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-w95v-4h65-j455 SiYuan Affected by Zero-Click NTLM Hash Theft and Blind SSRF via Mermaid Diagram Rendering
History

Thu, 16 Apr 2026 20:30:00 +0000

Type Values Removed Values Added
First Time appeared B3log
B3log siyuan
CPEs cpe:2.3:a:b3log:siyuan:*:*:*:*:*:*:*:*
Vendors & Products B3log
B3log siyuan
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}


Fri, 10 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 10 Apr 2026 09:00:00 +0000

Type Values Removed Values Added
First Time appeared Siyuan
Siyuan siyuan
Vendors & Products Siyuan
Siyuan siyuan

Thu, 09 Apr 2026 21:15:00 +0000

Type Values Removed Values Added
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.
Title SiYuan Affected by Zero-Click NTLM Hash Theft and Blind SSRF via Mermaid Diagram Rendering
Weaknesses CWE-918
References
Metrics cvssV4_0

{'score': 8.7, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-10T18:12:28.538Z

Reserved: 2026-04-09T01:41:38.536Z

Link: CVE-2026-40107

cve-icon Vulnrichment

Updated: 2026-04-10T18:12:24.352Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-09T21:16:12.123

Modified: 2026-04-16T20:28:02.423

Link: CVE-2026-40107

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-10T09:29:05Z

Weaknesses