CVE-2026-49493: Markdown Preview Enhanced Arbitrary Code Execution via Bitfield interpretJS()
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.
Metrics
- CVSS v4.0
- 8.6
- Severity
- HIGH
- Fixed in
- 0.8.28
- Affected Products
- 1
HarborGuard Analysis
Synopsis
An arbitrary code execution vulnerability exists in Markdown Preview Enhanced, a server-side markdown rendering extension, before version 0.8.28. The flaw is reached over the network and requires no authentication, but a victim must open or render a crafted markdown document. Successful exploitation gives an attacker full control over the rendering process, enabling arbitrary code execution on the server. A patched-image rebuild at version 0.8.28 is available on HarborGuard for affected environments.
HarborGuard Coverage
Detection of CVE-2026-49493 is available across every HarborGuard environment: the CVE is ingested from upstream advisory feeds within minutes of publication and matched against all customer images, including custom-built images that bundle Markdown Preview Enhanced. Any image carrying a version below 0.8.28 is flagged automatically.
AvailableHarborGuard scores this CVE at CVSS 8.6 (High) and weights it against each environment's compliance policy to determine urgency and routing. Triage results are delivered to the appropriate team inbox within each customer organization based on configured policy rules.
AvailableA patched-image rebuild at version 0.8.28 is available on HarborGuard for any environment running an affected version. For customers who opt into auto-remediation, HarborGuard performs the rebuild, runs a regression test suite, and opens a pull request against affected workloads automatically.
AvailableExploit Conditions
- Network reachabilityRequired
The attacker delivers the malicious markdown document over the network, so the vulnerable rendering service must be reachable or the document must be transmitted to a victim via a network channel.
- AuthenticationNot required
No credentials or account privileges are needed; any unauthenticated party can craft and deliver a malicious document.
- Victim interactionRequired
A victim must open or trigger rendering of the crafted markdown document, making this a social-engineering vector where the attacker must convince someone to process the file.
- Attack complexityDetail
Exploit conditions are straightforward and reliable; no race conditions, memory layout dependencies, or special environmental configuration are required beyond delivering the document.
Blast Radius
- The attacker executes arbitrary code in the server-side rendering process, gaining the same system access as the process owner.
- Confidential data accessible to the rendering process, including environment variables, credentials, and files, is read directly.
- The attacker can write or overwrite files and data reachable by the rendering process, tampering with application state or stored content.
- The rendering service itself can be crashed or its process hijacked, causing a denial of service for any user depending on document rendering or export.
How HarborGuard Handles This
Available on HarborGuard: images containing Markdown Preview Enhanced below 0.8.28 are flagged as soon as the CVE is ingested. A patched rebuild at 0.8.28 becomes available immediately, since the upstream fix is already published. For customers who opt into auto-remediation, HarborGuard rebuilds the affected image at the patched version, executes a regression run, and opens a pull request against affected workloads; median time from CVE publication to merged patch PR for high-severity issues is around 90 minutes in environments with auto-remediation enabled. Where compliance policy requires manual approval, the triage card surfacing the CVSS 8.6 score and affected image list is routed to the configured team inbox so no action item is missed.
Fix available
- shd101wyy / Markdown Preview Enhanced< 0.8.28 (from 0)
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N