CVE-2025-65108simonhaenisch md-to-pdf
Critical 10.0 No auth needed
Follow: this CVE · simonhaenisch · simonhaenisch md-to-pdf We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.1
- 10.0
- EPSS
- —
- Auth required
- No
- Published
- Nov 21, 2025
- Updated
- Oct 18, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for md-to-pdf.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | md-to-pdf |
< 5.2.5 |
5.2.5 |
npm install md-to-pdf@5.2.5 |
Per OSV / GitHub Advisories (GHSA-547r-qmjm-8hvw). Check the version in your lockfile before upgrading.
Affected products
- simonhaenisch · md-to-pdf
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.