CVE-2025-65108

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

Published Nov 21, 2025 CVSS 3.1 · 10 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-547r-qmjm-8hvw md-to-pdf vulnerable to arbitrary JavaScript code execution when parsing front matter
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Simonhaenisch
Simonhaenisch md-to-pdf
Vendors & Products Simonhaenisch
Simonhaenisch md-to-pdf
Type Values Removed Values Added
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.
Title md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 24, 2025, 5:17 PM
Reserved
Nov 17, 2025, 8:55 PM
Status
Deferred
Published
Nov 21, 2025, 10:16 PM
Modified
Oct 18, 2026, 8:10 PM