Junglewise Threat Intelligence

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

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

Technologies: Shd101wyy Markdown Preview Enhanced. Vendors: Shd101wyy.

Executive brief

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.

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

Related threats