{"id":"CVE-2021-23639","published":"2021-12-10T20:05:16Z","modified":"2024-09-17T00:45:43Z","title":"Remote Code Execution (RCE)","vendor":null,"product":null,"tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.05413,"percentile":0.92891,"provenance":"source"},"cwes":[],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880","tags":["x_refsource_MISC"]},{"url":"https://github.com/simonhaenisch/md-to-pdf/issues/99","tags":["x_refsource_MISC"]},{"url":"https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a","tags":["x_refsource_MISC"]}],"priority":{"score":30.4,"factors":[{"name":"EPSS percentile","points":18.58},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.86}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2024-10-04","earliestUrl":"https://github.com/MohandAcherir/CVE-2021-23639","repos":[{"name":"MohandAcherir/CVE-2021-23639","url":"https://github.com/MohandAcherir/CVE-2021-23639","stars":0,"created":"2024-10-04"}]},"first":{"date":"2024-10-04","source":"PoC-in-GitHub","url":"https://github.com/MohandAcherir/CVE-2021-23639"},"provenance":"source"},"affectedVersions":[{"vendor":"n/a","product":"md-to-pdf","versions":[">= unspecified, < 5.0.0"]}],"affected":[{"ecosystem":"npm","package":"md-to-pdf","vulnerableRanges":["<5.0.0"],"patched":["5.0.0"],"from":["GHSA-x949-7cm6-fm6p"],"provenance":"source"}],"summary":{"text":"The md-to-pdf npm package, in versions before 5.0.0, is vulnerable to remote code execution because it uses the gray-matter library to parse front matter without disabling its JavaScript engine. An attacker who can supply markdown content for md-to-pdf to process can execute arbitrary code, with no authentication or user interaction required and only network reachability to the affected service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:32:38Z"},"euvd":{"id":"EUVD-2021-2610","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-simonhaenisch-md-to-pdf-cve-2021-23639","children":[{"from":"CVE-2021-23639","to":"CVE-2025-65108","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/lib/config.ts"],"commits":["https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a","https://github.com/simonhaenisch/md-to-pdf/commit/46bdcf2051c8d1758b391c1353185a179a47a4d9"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.53,"basis":"same package + description similarity"}]}]}}