{"id":"CVE-2025-65108","summary":"md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter","details":"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.","aliases":["GHSA-547r-qmjm-8hvw"],"modified":"2026-08-12T03:51:27.721254809Z","published":"2025-11-21T21:52:02.729Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65108.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65108.json"},{"type":"ADVISORY","url":"https://github.com/simonhaenisch/md-to-pdf/security/advisories/GHSA-547r-qmjm-8hvw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-65108"},{"type":"FIX","url":"https://github.com/simonhaenisch/md-to-pdf/commit/46bdcf2051c8d1758b391c1353185a179a47a4d9"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/simonhaenisch/md-to-pdf","events":[{"introduced":"0"},{"fixed":"46bdcf2051c8d1758b391c1353185a179a47a4d9"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"5.2.5"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"versions":["v5.2.4","v5.2.3","v5.2.2","v5.2.1","v5.2.0","v5.1.0","v5.0.2","v5.0.1","v5.0.0","v4.1.0","v4.0.1","v4.0.0","v3.3.2","v3.3.1","v3.3.0","v3.2.1","v3.2.0","v3.1.2","v3.1.1","v3.1.0","v3.0.1","v3.0.0","v3.0.0-pre.1","v3.0.0-pre.0","v2.8.2","v2.8.1","v2.8.0","v2.7.1","v2.7.0","v2.6.4","v2.6.3","v2.6.2","v2.6.1","v2.5.0","v2.4.2","v2.4.1","v2.4.0","v2.3.2","v2.3.1","v2.3.0","v2.2.0","v2.1.5","v2.1.4","v2.1.3","v2.1.2","v2.1.1","v2.1.0","v2.0.1","v2.0.0","v1.2.1","v1.2.0","v1.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-65108.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"}]}