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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.33%, higher than 27% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-09T21:03:58.572Z
- Modified: 2026-06-25T23:11:27.622Z
- Also known as: GHSA-w95v-4h65-j455, GO-2026-5702
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- siyuan-note siyuan: < 3.6.4
- github.com/siyuan-note/siyuan/kernel (Go): before 0.0.0-20260407035653-2f416e5253f1
- b3log siyuan: before 3.6.4

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`

## References

- <https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w95v-4h65-j455> (exploit, advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40107> (advisory)
- <https://github.com/siyuan-note/siyuan> (package)

## Sources

- CVE List: [CVE-2026-40107](https://www.cve.org/CVERecord?id=CVE-2026-40107), CVE Terms of Use, modified 2026-04-10
- GitHub Advisory Database: [GHSA-w95v-4h65-j455](https://github.com/advisories/GHSA-w95v-4h65-j455), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5702](https://pkg.go.dev/vuln/GO-2026-5702), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-40107](https://nvd.nist.gov/vuln/detail/CVE-2026-40107), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-40107 · Whole record: https://cve.day/CVE-2026-40107.json · Rebuilt by cve.day 2026-11-25T22:59:18.424Z
