8.6high
Markdown Preview Enhanced Arbitrary Code Execution via WaveDrom eval()
- Severity
- 8.6high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.67% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
Description
Markdown Preview Enhanced before 0.8.28 parses WaveDrom diagrams by evaluating untrusted markdown content with eval(), allowing arbitrary JavaScript execution. The flaw affects every render path - the live preview (window.eval) and presentation mode plus HTML export (the bundled WaveDrom.ProcessAll()/eva() helpers) - and can also be triggered through a <script type="WaveDrom"> element injected via raw HTML in markdown. When a victim previews or exports a crafted markdown document, an attacker can execute arbitrary code, leading to arbitrary file write. Fixed in 0.8.28 by parsing with JSON5.parse() and sanitizing WaveDrom data scripts to inert strict JSON.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| shd101wyy Markdown Preview Enhanced | before 0.8.28 | CVE List |
All scores
| VulnCheck | 8.6high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
Markdown Preview Enhanced before 0.8.28 parses WaveDrom diagrams by evaluating untrusted markdown content with eval(), allowing arbitrary JavaScript execution. The flaw affects every render path - the live preview (window.eval) and presentation mode plus HTML export (the bundled WaveDrom.ProcessAll()/eva() helpers) - and can also be triggered through a <script type="WaveDrom"> element injected via raw HTML in markdown. When a victim previews or exports a crafted markdown document, an attacker can execute arbitrary code, leading to arbitrary file write. Fixed in 0.8.28 by parsing with JSON5.parse() and sanitizing WaveDrom data scripts to inert strict JSON.
NVD (es)
Markdown Preview Enhanced anterior a la versión 0.8.28 analiza diagramas WaveDrom al evaluar contenido markdown no confiable con eval(), lo que permite la ejecución arbitraria de JavaScript. La vulnerabilidad afecta a cada ruta de renderizado - la vista previa en vivo (window.eval) y el modo de presentación más la exportación HTML (los ayudantes WaveDrom.ProcessAll()/eva() incluidos) - y también puede activarse a través de un elemento [script_tag] inyectado mediante HTML sin procesar en markdown. Cuando una víctima previsualiza o exporta un documento markdown manipulado, un atacante puede ejecutar código arbitrario, lo que lleva a la escritura arbitraria de archivos. Solucionado en la versión 0.8.28 al analizar con JSON5.parse() y sanear los scripts de datos de WaveDrom a JSON estricto inerte.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-50733 changed 2026-11-08 | CVE Terms of Use |
| NVD | CVE-2026-50733 changed 2026-10-26 | Public domain |