# CVE-2026-49493: Markdown Preview Enhanced code execution in Bitfield renderer

Source: https://junglewise.ai/threats/cve-2026-49493-markdown-preview-enhanced-code-execution-in-bitfield-renderer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-05. Updated: 2026-06-05  
License: CC BY 4.0 with a link back

CVE-2026-49493 · Severity: high · CVSS 8.8 · Published 2026-06-05

Markdown Preview Enhanced is a popular tool used to render and export Markdown documents. A security flaw allows an attacker to execute malicious code on a user's system if the user opens or exports a specially crafted Markdown file. This could lead to a full system compromise, data theft, or unauthorized access to the user's environment.

Technologies: [Shd101wyy Markdown Preview Enhanced](https://junglewise.ai/threats/technologies/markdown-preview-enhanced). Vendors: [Shd101wyy](https://junglewise.ai/threats/vendors/shd101wyy).

## Quick answers

**Is CVE-2026-49493 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49493 being exploited in the wild.

**How severe is CVE-2026-49493?** High severity, with a CVSS score of 8.8, published 5 June 2026.

**Which products and versions are affected?** Shd101wyy Markdown Preview Enhanced < 0.8.28.

**Is there a fix for CVE-2026-49493?** A patch was published on 2026-06-05: Fixed in version 0.8.28 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49493 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49493?** Check whether you run Shd101wyy Markdown Preview Enhanced at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

Markdown Preview Enhanced versions prior to 0.8.28 are vulnerable to code injection (CWE-94). The Bitfield renderer used the interpretJS() function, which internally calls vm.runInNewContext() to evaluate the content of fenced code blocks. Because these blocks were treated as executable code rather than static data, an attacker can embed malicious JavaScript within a bitfield definition. When a victim renders or exports a document containing this crafted block, the code executes with the privileges of the application. The issue was resolved in version 0.8.28 by replacing the insecure evaluation with JSON5.parse() for bitfield register definitions.

## Affected products

- shd101wyy Markdown Preview Enhanced < 0.8.28

## Timeline

- 2026-06-05: disclosed
- 2026-06-05: patched: Fixed in version 0.8.28
- 2026-06-05: advisory

## References

- [https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28](https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28)
- [https://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-bitfield-interpretjs](https://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-bitfield-interpretjs)

## Related threats

- [Markdown Preview Enhanced command injection in webview message handler](https://junglewise.ai/threats/cve-2026-54702-markdown-preview-enhanced-is-a-markdown-preview-extension-for)
- [Markdown Preview Enhanced code execution via untrusted config.js](https://junglewise.ai/threats/cve-2026-54566-markdown-preview-enhanced-is-a-markdown-preview-extension-for)
- [Markdown Preview Enhanced command injection in preview links on Windows](https://junglewise.ai/threats/cve-2026-54525-markdown-preview-enhanced-is-a-markdown-preview-extension-for)
- [Markdown Preview Enhanced code injection in WaveDrom rendering](https://junglewise.ai/threats/cve-2026-11422-markdown-preview-enhanced-code-injection-in-wavedrom-rendering)
- [Markdown Preview Enhanced code injection in WaveDrom rendering](https://junglewise.ai/threats/cve-2026-50733-markdown-preview-enhanced-code-injection-in-wavedrom-rendering)
