CVE-2026-40107: SiYuan is a personal knowledge management system
CVE-2026-40107 is a medium-severity flaw (CVSS 6.5) affecting siyuan. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Risk facts
| CVSS score | 6.5 (Medium) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Required |
| EPSS exploit chance | 0.3% (top 77%) |
| CISA exploited list | No |
| Weakness | CWE-918 |
| Published | 2026-04-09 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-40107?
siyuan: upgrade to 3.6.4. Exact commands for each OS are on this page.
Is CVE-2026-40107 being exploited?
CVE-2026-40107 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-40107 affect?
CVE-2026-40107 affects siyuan. Severity is medium (CVSS 6.5). 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 S
How urgent is CVE-2026-40107?
Priority 34/100. Public exploit reference
Software pages
Windows vulnerabilities · Electron vulnerabilities
Related CVEs
- CVE-2026-39846 CRITICAL 9.0 UPGRADE SiYuan is a personal knowledge management system
- CVE-2026-40922 MEDIUM 5.4 UPGRADE SiYuan is an open-source personal knowledge management system
- CVE-2026-40322 CRITICAL 9.0 UPGRADE SiYuan is an open-source personal knowledge management system
- CVE-2026-40318 HIGH 8.5 UPGRADE SiYuan is an open-source personal knowledge management system
- CVE-2026-40259 HIGH 8.1 UPGRADE SiYuan is an open-source personal knowledge management system