{
  "id": "CVE-2025-65108",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-65108",
  "published_at": "2025-11-21T21:52:02.729Z",
  "title": "md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter",
  "vendor": "simonhaenisch",
  "product": "md-to-pdf",
  "cvss": {
    "score": 10,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cna": 10
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "simonhaenisch",
        "product": "md-to-pdf",
        "ranges": [
          "\u003c 5.2.5"
        ],
        "fixed_in": [
          "5.2.5"
        ]
      }
    ],
    "upgrade": [
      "Upgrade md-to-pdf to 5.2.5 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/simonhaenisch/md-to-pdf/security/advisories/GHSA-547r-qmjm-8hvw"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/simonhaenisch/md-to-pdf/commit/46bdcf2051c8d1758b391c1353185a179a47a4d9"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
