llamaCVEVulnerability Intelligence
/
siyuan

CVE-2026-40322

SiYuan: Mermaid javascript: Link Injection Leads to Stored XSS and Electron RCE

Texto original en inglés · Ver en español

Specific setups onlyParche disponiblecross-site scripting (XSS)
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H Fuente: CNA
ExplotaciónPoC públicaSSVC: poc · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión3.6.4
Exposición218 dDesde la divulgación, 16 abr 2026, 6:00 p. m.
Detección214 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir de cerca
Monitorear y programar la remediación
Existe PoC pública, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Monitoreo
Detectada
Fuente: OSV +1
16 abr 26
17 abr 26
17 nov 26
20 nov 26
21 nov 26
16 abr 26
10 jun 26
4 ago 26
27 sept 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2026-40322 divulgada · CVSS 9.1 (CNA)
Divulgación Evaluación SSVC CISA-ADP · explotación PoC pública
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen

SiYuan is an open-source personal knowledge management system. In versions 3.6.3 and below, Mermaid diagrams are rendered with securityLevel set to "loose", and the resulting SVG is injected into the DOM via innerHTML. This allows attacker-controlled javascript: URLs in Mermaid code blocks to survive into the rendered output. On desktop builds using Electron, windows are created with nodeIntegration enabled and contextIsolation disabled, escalating the stored XSS to arbitrary code execution when a victim opens a note containing a malicious Mermaid block and clicks the rendered diagram node. This issue has been fixed in version 3.6.4.

SiYuan renders Mermaid diagrams with securityLevel loose and injects the SVG via innerHTML, which on desktop Electron builds allows OS command execution as the current user. Fixed in 3.6.4.

¿Qué significa?Mermaid diagram output is inserted into the page with innerHTML under a loose security setting, so a javascript: link can be injected. In web contexts this is stored XSS, and on desktop Electron builds it leads to arbitrary OS command execution as the current desktop user.
¿Quién está afectado?Web contexts are affected by the stored XSS. Code execution through Node APIs requires a desktop Electron build whose windows have nodeIntegration enabled and contextIsolation disabled. Check the installed SiYuan version number against the fixed version 3.6.4; the product range lists 3.6.4 as the fix.
¿Qué hacer?Upgrade SiYuan to version 3.6.4 or later. The advisory names no separate patch identifiers or workaround in the checked facts.
Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Mermaid diagrams are rendered with securityLevel set to loose and the SVG is injected via innerHTML.“SiYuan renders Mermaid diagrams with securityLevel: "loose" and then injects the returned SVG into the DOM using innerHTML”
02
Code execution through Node APIs requires a desktop Electron build, where windows have nodeIntegration enabled and contextIsolation disabled.“On desktop builds, this becomes code execution because Electron windows are created with:”
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
siyuan≤ 3.6.3
siyuan< 3.6.4
3.6.3
3.6.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
siyuan
Corregida 3.6.4 — —
Versiones corregidas3.6.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/siyuan-note/siyuan/security/advisories/GHSA-x63q-3rcj-hhp5
Otrahttps://github.com/siyuan-note/siyuan/releases/tag/v3.6.4

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.