CVE-2021-23639

CRITICAL

md-to-pdf < 5.0.0 - Remote Code Execution via Gray-Matter Front Matter Parsing

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2021-23639. PoCs published by MohandAcherir.

AI-analyzed exploit summary The repository contains a functional Python exploit for CVE-2021-23639, targeting the md-to-pdf library. The exploit leverages the gray-matter library's JS engine to achieve Remote Code Execution (RCE) via crafted front matter content.

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.

Exploits (1)

nomisec WORKING POC
by MohandAcherir · poc
https://github.com/MohandAcherir/CVE-2021-23639

The repository contains a functional Python exploit for CVE-2021-23639, targeting the md-to-pdf library. The exploit leverages the gray-matter library's JS engine to achieve Remote Code Execution (RCE) via crafted front matter content.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: md-to-pdf (versions vulnerable to CVE-2021-23639)
No auth needed
Prerequisites: Vulnerable md-to-pdf installation · Network access to the target server
devstral-2 · analyzed Feb 18, 2026 Full analysis →

References (3)

Core 3
Core References
Exploit, Patch, Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JS-MDTOPDF-1657880
Exploit, Issue Tracking, Patch, Third Party Advisory x_refsource_misc
https://github.com/simonhaenisch/md-to-pdf/issues/99

Scores

CVSS v3 9.8
EPSS 0.1991
EPSS Percentile 95.6%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Details

Status published
Products (2)
markdown_to_pdf_project/markdown_to_pdf < 5.0.0
npm/md-to-pdf 0 - 5.0.0npm
Published Dec 10, 2021
Tracked Since Feb 18, 2026