RCE in md-to-pdf via JavaScript Injection in Markdown Front-Matter
CVE-2025-65108 is a remote code execution vulnerability in md-to-pdf, a CLI tool that converts Markdown files to PDF using Node.js and headless Chrome. In versions prior to 5.2.5, a crafted Markdown front-matter block containing JavaScript delimiters can trigger arbitrary code execution during parsing. The issue is attributed to the gray-matter library behavior in the md-to-pdf conversion process, where attacker-controlled content in front-matter is interpreted by the JavaScript engine instead of being treated strictly as data. As a result, processing a malicious Markdown file can execute arbitrary code in the context of the md-to-pdf process.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
No public exploits tracked yet. Mallory keeps watching.
No public exploit code observed for this vulnerability.
Recent activity
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A Markdown-to-PDF remote code execution vulnerability described as allowing RCE via JavaScript injection in Markdown front-matter (mentioned only as a related post, without further technical detail in this content).
A critical remote code execution vulnerability in a Markdown-to-PDF context that allows RCE via JavaScript injection in Markdown front-matter.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.