Back to CVE records
Critical 10.0Published Nov 21, 2025

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

Updated under an hour ago ()

Does this affect you?

It affects simonhaenisch md-to-pdf. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
10.0 CRITICAL (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-94
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
GitHub_M
NVD analysis
Deferred
Record last updated
Nov 24, 2025
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
simonhaenisch md-to-pdf
simonhaenisch:md_to_pdf (from the name)
before 5.2.5
CNA record

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.
CVE-2025-65108: md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter | InfoSec Signals