Skip to main content
CVE-2025-65108VulnerabilityPublished Updated

CVE-2025-65108: simonhaenisch md-to-pdf · Code Injection

Affects simonhaenisch md-to-pdfSource CVE Database V5

0

Not known to be exploited · CVSS 10.0 Critical : upgrade to 5.2.5 as a priority.

Data as of 26 Oct 2026, 06:26 UTC

CVSS 3.1 base score
10.0Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.9% chance of exploitation in 30 days – higher than 61% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.2.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Upgrade simonhaenisch md-to-pdf to 5.2.5.

Affected software

ProductAffectedFixed in
npmmd-to-pdfpkg:npm/md-to-pdfOther threatsAffected
  • <5.2.5
Fixed in
  • 5.2.5

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Immediate upgrade to md-to-pdf version 5.2.5 or later is essential to remediate this vulnerability. Organizations should audit their environments to identify all instances of md-to-pdf and verify version compliance. Restrict Markdown input sources to trusted users and systems to reduce exposure to maliciously crafted files. Implement input validation and sanitization for Markdown front-matter to detect and block JavaScript delimiters or suspicious content. Employ runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions to monitor for anomalous process behavior during PDF generation. Consider isolating md-to-pdf execution in sandboxed or containerized environments with minimal privileges to limit potential damage from exploitation. Regularly review and update dependencies like gray-matter to their latest secure versions. Finally, maintain robust incident response plans to quickly address any exploitation attempts.

Description

md-to-pdf is a CLI tool for converting Markdown files to PDF using Node.js and headless Chrome. Prior to version 5.2.5, a Markdown front-matter block that contains JavaScript delimiter causes the JS engine in gray-matter library to execute arbitrary code in the Markdown to PDF converter process of md-to-pdf library, resulting in remote code execution. This issue has been patched in version 5.2.5.

References

Community reviews

Loading reviews…