CVE-2025-65108CWE-94code-injection

CVE-2025-65108

Critical · published November 22, 2025

CVSS v3.1
10.0
EPSS
1%
Percentile
61.2
In the wild
Unconfirmed
What it is

🔥 A sneaky JavaScript delimiter in Markdown can unleash chaos! This vulnerability lets attackers execute arbitrary code through the md-to-pdf library, making it a recipe for disaster! ⚡ Think of this like a restaurant that accepts any special request from a customer without checking the ingredients. If a diner slips in a dangerous spice that the chef doesn't recognize, it can ruin the entire dish—much like how this flaw allows attackers to run any code they want! With this vulnerability, an attacker could gain full control over the server running the md-to-pdf process. Imagine them executing harmful commands, infiltrating sensitive files, or even taking over the entire system—absolutely devastating!

Put simply

Think of this like a restaurant that accepts any special request from a customer without checking the ingredients. If a diner slips in a dangerous spice that the chef doesn't recognize, it can ruin the entire dish—much like how this flaw allows attackers to run any code they want! This issue arises when a Markdown front-matter block containing JavaScript delimiters is processed by the gray-matter library, allowing remote code execution during the conversion of Markdown to PDF. Prior to version 5.2.5, this vulnerability posed a serious risk to any application using this library.

What to do

With this vulnerability, an attacker could gain full control over the server running the md-to-pdf process. Imagine them executing harmful commands, infiltrating sensitive files, or even taking over the entire system—absolutely devastating! To protect your system, immediately update the md-to-pdf library to version 5.2.5 or later. Additionally, review your Markdown files to ensure they do not contain malicious front-matter elements. Regularly audit your libraries for updates to prevent future vulnerabilities! You've got this! By taking these steps, you're not just fixing this issue—you're boosting your security hero status! 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00960 · 61.2th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-11-22T03:16Z
References (2)
EPSS history
Timeline
  • 21 NOV 21:52Z
    md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter
    cvelistv5