{"id":"CVE-2026-50733","title":"Markdown Preview Enhanced Arbitrary Code Execution via WaveDrom eval()","summary":"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 prese…","severity":"high","cvss":8.8,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cvssSource":"cna","cwe":["CWE-95"],"vendor":"shd101wyy","product":"Markdown Preview Enhanced","affected":["markdown_preview_enhanced < 0.8.28"],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-06-05T19:03:16.138729Z"},"exploitAvailable":true,"published":"2026-06-05","updated":"2026-11-08","sourceUpdated":"2026-11-08T14:05:02.848Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-50733","references":[{"url":"https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28","label":"Markdown Preview Enhanced 0.8.28 Release Notes"},{"url":"https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/2315","label":"Issue #2315"},{"url":"https://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-wavedrom-eval","label":"VulnCheck Advisory: Markdown Preview Enhanced Arbitrary Code Execution via WaveDrom eval()"}],"tags":["cve.org","exploit-available"],"epss":0.00667,"epssPercentile":0.52137,"ingestedAt":"2026-11-08T14:51:22.379Z","slug":"CVE-2026-50733","body":"## Overview\n\nMarkdown 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.\n\n## Affected\n\n- `markdown_preview_enhanced < 0.8.28`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"midnight","depthScore":61,"depthScoreParts":{"impact":48.4,"likelihood":0.1,"exploitation":12,"ransomware":0},"changes":[]}