---
id: CVE-2026-49493
title: Markdown Preview Enhanced Arbitrary Code Execution via Bitfield interpretJS()
summary: >-
  Markdown Preview Enhanced before 0.8.28 parses Bitfield fenced code blocks
  with interpretJS(), which evaluates the block content as code via
  vm.runInNewContext(), allowing arbitrary code execution. A crafted markdown
  document containing …
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-94
vendor: shd101wyy
product: Markdown Preview Enhanced
affected:
  - markdown_preview_enhanced < 0.8.28
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-06-09T14:11:41.871600Z'
published: '2026-06-05'
updated: '2026-11-08'
sourceUpdated: '2026-11-08T14:04:54.235Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-49493'
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://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-bitfield-interpretjs
    label: >-
      VulnCheck Advisory: Markdown Preview Enhanced Arbitrary Code Execution via
      Bitfield interpretJS()
tags:
  - cve.org
epss: 0.00327
epssPercentile: 0.25927
ingestedAt: '2026-11-08T14:51:22.387Z'
---

## Overview

Markdown Preview Enhanced before 0.8.28 parses Bitfield fenced code blocks with interpretJS(), which evaluates the block content as code via vm.runInNewContext(), allowing arbitrary code execution. A crafted markdown document containing a malicious bitfield code block executes attacker-controlled code on the server side when the document is rendered or exported. Fixed in 0.8.28 by parsing bitfield register definitions with JSON5.parse(), since they are purely data.

## Affected

- `markdown_preview_enhanced < 0.8.28`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
