{"id":"CVE-2021-23639","aliases":["CVE-2021-23639","GHSA-x949-7cm6-fm6p","SNYK-JS-MDTOPDF-1657880"],"related":[],"kind":"vulnerability","state":"published","title":"Remote Code Execution (RCE)","summary":"The package md-to-pdf before 5.0.0 are vulnerable to Remote Code Execution (RCE) due to utilizing the library gray-matter to parse front matter content, without disabling the JS engine.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The package md-to-pdf before 5.0.0 are vulnerable to Remote Code Execution (RCE) due to utilizing the library gray-matter to parse front matter content, without disabling the JS engine.","source":"cvelist"},{"lang":"es","text":"El paquete md-to-pdf versiones anteriores a 5.0.0, es vulnerable a una Ejecución de Código Remota (RCE) debido al uso de la biblioteca gray-matter para analizar el contenido del front matter, sin deshabilitar el motor JS","source":"nvd"}],"published":"2021-12-10T20:05:16.643Z","modified":"2026-07-08T06:49:43.151Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"5.0.0","status":"affected"}],"product":"md-to-pdf","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.0.0"}],"ecosystem":"npm","package":"md-to-pdf","purl":"pkg:npm/md-to-pdf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.0.0"}],"vendor":"markdown_to_pdf_project","product":"markdown_to_pdf","cpe":"cpe:2.3:a:markdown_to_pdf_project:markdown_to_pdf:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simonhaenisch/md-to-pdf/issues/99","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23639","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/simonhaenisch/md-to-pdf","tags":["package"],"sources":["ghsa"]}],"credits":["Oscar Arnflo"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23639","url":"https://www.cve.org/CVERecord?id=CVE-2021-23639","licence":"CVE Terms of Use","modified":"2024-09-17T00:45:43.108Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x949-7cm6-fm6p","url":"https://github.com/advisories/GHSA-x949-7cm6-fm6p","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:43.151Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23639","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23639","licence":"Public domain","modified":"2026-06-17T03:38:50.977Z"}],"updatedAt":"2026-11-25T22:58:05.927Z","epss":{"score":0.05413,"percentile":0.92867,"date":"2026-12-01T12:00:22.000Z"}}