# CVE-2026-49492: Markdown Preview Enhanced OS command injection in previewer

Source: https://junglewise.ai/threats/cve-2026-49492-markdown-preview-enhanced-os-command-injection-in-previewer  
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-49492 · Severity: high · CVSS 8.8 · Published 2026-06-05

Markdown Preview Enhanced, a popular extension for viewing formatted documents, contains a security flaw that allows attackers to execute commands on a user's computer. By tricking a user into previewing a specially crafted Markdown file, an attacker could gain full control over the victim's system, potentially leading to data theft or malware installation. This issue specifically affects users on Windows systems.

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-49492 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49492 being exploited in the wild.

**How severe is CVE-2026-49492?** 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-49492?** 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-49492 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-49492?** 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 prior to version 0.8.28 is vulnerable to OS command injection (CWE-78) on Windows systems. The vulnerability exists because the application opens external files and links from the preview through a system shell without properly validating untrusted inputs. Specifically, the diagram 'filename' attribute, imported file paths, and the 'latex_engine' code-chunk attribute are susceptible to command injection. An attacker can achieve remote code execution by convincing a user to open or preview a malicious markdown document. The fix in version 0.8.28 involves passing these inputs as literal arguments rather than through a shell and implementing stricter input validation.

## 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-os-command-injection-in-external-file-and-link-opening](https://www.vulncheck.com/advisories/markdown-preview-enhanced-os-command-injection-in-external-file-and-link-opening)

## 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)
