Skip to main content
VulnerabilityPublished Updated

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

Affects md-to-pdfSource GCVE Database

0
Compare
Authoritative record:CVE-2025-65108· Critical 10.0

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

Data as of 19 Nov 2026, 02:18 UTC

CVSS 3.1 base score
10.0Critical
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.110.0
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. Weaponized: 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 18 Nov 2026.

What to do

Upgrade md-to-pdf to 5.2.5.

Affected software

ProductAffectedFixed in
npmmd-to-pdfAffected
  • <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

A patch is available in md-to-pdf version 5.2.5 that fixes this vulnerability. Users should upgrade to version 5.2.5 or later to remediate the issue. Until patched, avoid processing untrusted Markdown input containing JavaScript front-matter delimiters. No other vendor advisory mitigation instructions are provided.

Description

The md-to-pdf library versions prior to 5.2.5 are vulnerable to remote code execution due to unsafe evaluation of JavaScript in Markdown front-matter. The vulnerability arises from the gray-matter library's JavaScript engine, which executes code when front-matter delimiters like ---javascript are present. An attacker can craft malicious Markdown input that triggers arbitrary code execution in the conversion process. This can lead to full system compromise if the converter runs in an exposed environment.

References

Community reviews

Loading reviews…