RCE in Simonhaenisch Md-To-Pdf

CVE-2025-65108

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.

Vulnerability class: RCE (Remote Code Execution)

EPSS: 0.009 (56.2th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 10.0 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2025-65108?
CVE-2025-65108 is a critical-severity vulnerability in Simonhaenisch Md-To-Pdf, classified under Code Injection. CVSS score: 10.0/10. Published 2025-11-21.
How severe is CVE-2025-65108?
Critical severity. CVSS v3 base score is 10.0 out of 10.