What’s Vulnerable › Vulnerabilities
CVE-2021-23639: Remote Code Execution (RCE)
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 5.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-12-10 · updated 2026-06-17
Description
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.
Affected products
- md-to-pdf: before 5.0.0 — fixed in 5.0.0
How to fix
Upgrade to a fixed version: md-to-pdf 5.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a
- https://github.com/simonhaenisch/md-to-pdf/issues/99
- https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880
- https://github.com/simonhaenisch/md-to-pdf/commit/a716259c548c82fa1d3b14a3422e9100619d2d8a
- https://github.com/simonhaenisch/md-to-pdf/issues/99
- https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880
Get alerted when CVE-2021-23639 or the next vulnerability affects your stack