External risk intelligence

md-to-pdf Remote Code Execution via Malicious Markdown Front-Matter

CVE advisorySeverity: CRITICAL (CVSS 10.0)

CVE-2025-65108

md-to-pdf is a command-line interface (CLI) tool designed for local file conversion, not a network-accessible service or web application. It is typically executed by developers or users on a local machine to process Markdown files. It lacks a public-facing network interface, and its use case does not involve listening for external connections.

Code Injection

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory concerns a vulnerability in md-to-pdf, a tool used to convert Markdown to PDF. The flaw allows for remote code execution if specially crafted input is processed, meaning an attacker could potentially run unauthorized commands. The main concern is confirming whether this specific conversion tool is in use and if it's exposed to untrusted input.

  • Malicious documents could run unauthorized code.
  • Critical vulnerability in a common developer tool.
  • Confirm usage and exposure to untrusted input.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by crafting a malicious Markdown file. When this file is processed by the `md-to-pdf` tool, a specific front-matter block triggers arbitrary code execution within the tool's process, potentially allowing the attacker to compromise the system.

  • Markdown file with malicious front-matter.
  • Processing the Markdown file with the tool.
  • Remote code execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, a crafted Markdown front-matter block could lead to arbitrary code execution within the `md-to-pdf` conversion process. This could impact the integrity and availability of the conversion tool itself.

  • Arbitrary code execution in converter.
  • Malicious Markdown file execution.
  • Compromised conversion process.

Operational Fix

Recommended remediation, mitigation, and detection steps

The md-to-pdf tool, a command-line utility, is primarily used by developers or users on local machines. Given its nature, the initial step is to identify any instances where this tool is integrated into development pipelines or used for automated documentation generation. Application owners or development teams responsible for build or documentation processes should be engaged to assess their use of md-to-pdf and plan for updating or mitigating the vulnerability based on its integration and potential exposure.

  • Application owners should manage this issue.
  • Verify where md-to-pdf is integrated.
  • Plan updates or risk reduction strategies.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is md-to-pdf?

md-to-pdf is a command-line interface tool built with Node.js and headless Chrome. Developers and users rely on it to convert Markdown files into PDF documents. It is often used to automate documentation generation or streamline formatting tasks within local development environments.

What does CWE-94 mean for CVE-2025-65108?

CWE-94 refers to Improper Control of Generation of Code. In this vulnerability, the tool incorrectly processes a Markdown front-matter block, allowing a malicious JavaScript delimiter to be interpreted as executable code. This leads to arbitrary code execution within the process running the converter.

How is this vulnerability triggered?

The flaw is triggered when the tool parses a specifically crafted Markdown file containing a malicious front-matter block. Simply having a file present does not trigger the bug; the tool must actively process or convert that malicious input file for the code execution to occur.

Is my system at risk?

Risk depends on how you use the tool. According to Halo Surface Signal, md-to-pdf is typically a local CLI utility and not an internet-facing service, making remote exploitation less likely in most cases. You should care most if the tool is integrated into an automated pipeline that processes untrusted files from external sources.

Do I need to update md-to-pdf?

Yes, if you use this software, you should update to version 5.2.5 or later. First, audit your development pipelines and local environments to locate where this utility is utilized. Once identified, prioritize updating the component to incorporate the security patch that fixes this processing flaw.

References