{"id":"GHSA-x949-7cm6-fm6p","summary":"Code Injection in md-to-pdf.","details":"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.","aliases":["CVE-2021-23639"],"modified":"2026-03-13T21:56:49.254341Z","published":"2021-12-16T14:34:40Z","database_specific":{"github_reviewed_at":"2021-12-14T14:31:35Z","severity":"CRITICAL","github_reviewed":true,"cwe_ids":["CWE-94"],"nvd_published_at":"2021-12-10T20:15:00Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23639"},{"type":"WEB","url":"https://github.com/simonhaenisch/md-to-pdf/issues/99"},{"type":"WEB","url":"https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a"},{"type":"PACKAGE","url":"https://github.com/simonhaenisch/md-to-pdf"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880"}],"affected":[{"package":{"name":"md-to-pdf","ecosystem":"npm","purl":"pkg:npm/md-to-pdf"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"5.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/12/GHSA-x949-7cm6-fm6p/GHSA-x949-7cm6-fm6p.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}