Read the docs
TI-2025-40260 Aliases CVE-2025-65108GHSA-547r-qmjm-8hvw

md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter

Priority HIGH 82CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.0096 61st percentileScored 2026-11-07
Fix Fixed md-to-pdf (simonhaenisch): 5.2.5md-to-pdf (npm): 5.2.5

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
simonhaenischmd-to-pdfbefore 5.2.55.2.5Patch availableCNA
—md-to-pdf (npm)before 5.2.55.2.5Patch availableGHSA-547r-qmjm-8hvw
  • md-to-pdf Vendorsimonhaenisch Affected before 5.2.5 Fixed in 5.2.5 Patch available CNA
  • md-to-pdf (npm) Vendor— Affected before 5.2.5 Fixed in 5.2.5 Patch available GHSA-547r-qmjm-8hvw

Remediation

  • Fix · CNA md-to-pdf (simonhaenisch) Fixed in 5.2.5
  • Fix · GHSA-547r-qmjm-8hvw md-to-pdf (npm) Fixed in 5.2.5 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-65108
  2. 2026-10-03 Alias added: GHSA-547r-qmjm-8hvw

References

Sources