{"cve":"CVE-2026-40107","nvd":{"published":"2026-04-09T21:16:12.123","modified":"2026-06-17T10:44:44.027","status":"Analyzed","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.","cvss_v4":{"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","score":8.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5},"cwes":["CWE-918"],"references":["https://github.com/siyuan-note/siyuan/security/advisories/GHSA-w95v-4h65-j455"],"products":["b3log:siyuan"],"source":"nvd","synced_at":"2026-10-19T22:28:59.047572785+00:00"},"epss":{"cve":"CVE-2026-40107","score":0.00306,"percentile":0.23458,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-w95v-4h65-j455","url":"https://osv.dev/vulnerability/GHSA-w95v-4h65-j455","summary":"SiYuan Affected by Zero-Click NTLM Hash Theft and Blind SSRF via Mermaid Diagram Rendering","modified":"2026-06-25T23:11:27.622221544Z","packages":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","ranges":["<0.0.0-20260407035653-2f416e5253f1"],"fixed":["0.0.0-20260407035653-2f416e5253f1"]}]},{"id":"GO-2026-5702","url":"https://osv.dev/vulnerability/GO-2026-5702","summary":"SiYuan Affected by Zero-Click NTLM Hash Theft and Blind SSRF via Mermaid Diagram Rendering in github.com/siyuan-note/siyuan/kernel","modified":"2026-06-25T23:01:39.352927543Z","packages":[{"ecosystem":"Go","name":"github.com/siyuan-note/siyuan/kernel","purl":"pkg:golang/github.com/siyuan-note/siyuan/kernel","ranges":["<0.0.0-20260407035653-2f416e5253f1"],"fixed":["0.0.0-20260407035653-2f416e5253f1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}