🔍 CVE-2025-65108

10.0
CVSS Score
CRITICAL
2025-11-21
2026-10-18 20:10
✅ 완료

🇰🇷 한글 설명

md-to-pdf 라이브러리의 gray-matter 라이브러리에서 Markdown front-matter의 JavaScript 구분자를 실행하여 arbitrary code execution을 허용합니다. 버전 5.2.5 이전에서 원격 코드 실행 가능합니다.

💡 쉬운 설명

마크다운 파일을 PDF로 변환할 때 특수한 코드 블록을 통해 악의적인 명령어를 실행할 수 있습니다. 이를 통해 서버나 개인 컴퓨터를 완전히 장악당할 수 있습니다.

🇺🇸 원문 (English)

md-to-pdf is a CLI tool for converting Markdown files to PDF using Node.js and headless Chrome. Prior to version 5.2.5, a Markdown front-matter block that contains JavaScript delimiter causes the JS engine in gray-matter library to execute arbitrary code in the Markdown to PDF converter process of md-to-pdf library, resulting in remote code execution. This issue has been patched in version 5.2.5.

📍 영향받는 시스템

md-to-pdf < 5.2.5

⚔️ 공격 벡터

악의적인 Markdown 파일의 front-matter에 JavaScript 구분자를 포함하여 md-to-pdf로 처리하도록 유도

🛡️ 대응 방법

md-to-pdf를 5.2.5 이상으로 업그레이드

🔧 검증 코드

출력된 버전이 5.2.5 이상이면 안전, 5.2.4 이하이면 취약함

Shell / Script
npm list md-to-pdf 2>/dev/null | grep -E '^.*md-to-pdf@' || grep -E '"md-to-pdf"' package.json | head -1

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

Node.js