🔍 CVE-2025-62380

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

🇰🇷 한글 설명

Mailgen 2.0.31 이하 버전의 generatePlaintext 메서드에서 HTML 주입 취약점이 발견되었습니다. 유니코드 라인 구분자를 포함한 HTML 태그가 정규식으로 제대로 제거되지 않아, 평문 이메일에 공격자의 악의적인 스크립트가 포함될 수 있으며, HTML로 렌더링될 경우 브라우저에서 실행됩니다.

💡 쉬운 설명

Mailgen 이메일 생성 도구에서 특수한 방법으로 숨겨진 HTML 코드가 감지되지 않고 남아있습니다. 이 이메일을 열었을 때 공격자의 악성 코드가 사용자 브라우저에서 실행될 수 있습니다.

🇺🇸 원문 (English)

mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.31 contain an HTML injection vulnerability in plaintext emails generated with the generatePlaintext method when user generated content is supplied. The plaintext generation code attempts to strip HTML tags using a regular expression and then decodes HTML entities, but tags that include certain Unicode line separator characters are not matched and removed. These encoded tags are later decoded into valid HTML content, allowing unexpected HTML to remain in output intended to be plaintext. Projects are affected if they call Mailgen.generatePlaintext with untrusted input and then render or otherwise process the returned string in a context where HTML is interpreted. This can lead to execution of attacker supplied script in the victim’s browser. Version 2.0.32 fixes the issue.

📍 영향받는 시스템

mailgen <= 2.0.31

⚔️ 공격 벡터

신뢰할 수 없는 사용자 입력을 generatePlaintext()에 전달하여 Unicode line separator(U+2028, U+2029)를 포함한 HTML 태그를 정규식 필터링으로 우회하고 XSS 실행

🛡️ 대응 방법

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

🔧 검증 코드

현재 설치된 mailgen 버전을 확인합니다. 2.0.32 이상이면 안전하고, 2.0.31 이하이면 즉시 업그레이드 필요합니다.

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

💻 영향받는 소프트웨어

Node.js