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.