{"id":"CVE-2026-50733","published":"2026-06-05T17:49:53Z","modified":"2026-11-08T14:05:02Z","title":"Markdown Preview Enhanced Arbitrary Code Execution via WaveDrom eval()","vendor":"shd101wyy","product":"Markdown Preview Enhanced","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00667,"percentile":0.52809,"provenance":"source"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"}],"references":[{"url":"https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28","tags":["release-notes"]},{"url":"https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/2315","tags":["issue-tracking"]},{"url":"https://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-wavedrom-eval","tags":["third-party-advisory"]}],"priority":{"score":16.7,"factors":[{"name":"EPSS percentile","points":10.56},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"shd101wyy","affectedVersions":[{"vendor":"shd101wyy","product":"Markdown Preview Enhanced","versions":["< 0.8.28"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-06-05T19:03:16.138729Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-34870","exploited":false,"provenance":"source"}}