🔍 CVE-2025-62366

0.0
CVSS Score
UNKNOWN
2025-10-14
2026-10-08 11:10
✅ 완료

🇰🇷 한글 설명

mailgen은 Node.js 패키지로 거래 메일 생성에 사용되며, 2.0.30 버전 이하에서 HTML 엔티티로 인코딩된 HTML 태그가 제거되지 않아 plaintext 이메일에 HTML injection 취약점이 존재합니다. 이후 HTML로 렌더링될 경우 공격자가 제어하는 JavaScript 실행이 가능합니다.

💡 쉬운 설명

mailgen 패키지가 사용자 입력의 HTML 태그를 제대로 제거하지 못해, 특수 형식의 코드를 삽입하면 악의적인 스크립트가 실행될 수 있습니다. 이메일이 HTML로 표시될 때 공격자의 명령을 실행하게 됩니다.

🇺🇸 원문 (English)

mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.30 contain an HTML injection vulnerability in plaintext emails produced by the generatePlaintext method when user‑generated content is supplied. The function attempts to remove HTML tags, but if tags are provided as encoded HTML entities they are not removed and are later decoded, resulting in active HTML (for example an img tag with an event handler) in the supposed plaintext output. In contexts where the generated plaintext string is subsequently rendered as HTML, this can allow execution of attacker‑controlled JavaScript. Versions 2.0.31 and later contain a fix. No known workarounds exist.

📍 영향받는 시스템

mailgen <= 2.0.30 (Node.js)

⚔️ 공격 벡터

HTML 엔티티 인코딩된 태그를 이메일 콘텐츠에 주입하여 plaintext 필터 우회 후 HTML 렌더링 시 JavaScript 실행

🛡️ 대응 방법

mailgen을 2.0.31 이상으로 업그레이드

🔧 검증 코드

출력된 버전이 2.0.31 이상이면 안전하며, 2.0.30 이하면 업그레이드 필요

Shell / Script
npm list mailgen 2>/dev/null | grep mailgen

💻 영향받는 소프트웨어

Node.js