🇰🇷 한글 설명
Nodemailer 10.0.13 미만 버전에서 SMTPConnection._actionEHLO 함수 내 정규 표현식의 중복된 공백 패턴으로 인해 ReDoS(정규 표현식 서비스 거부) 취약점이 발생합니다. 악의적인 SMTP 서버가 긴 공백과 일치하지 않는 토큰을 포함한 응답을 보낼 경우, Node.js 이벤트 루프가 수 초에서 수 시간 동안 차단될 수 있습니다.
💡 쉬운 설명
메일 전송 라이브러리가 특정 형식의 잘못된 응답을 받으면 계산을 무한히 반복하느라 멈춰버리는 문제입니다. 이로 인해 서버가 응답하지 않는 상태가 되어 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
Nodemailer 3.0.0 before 10.0.13 has a regular expression denial of service in SMTPConnection._actionEHLO, whose four AUTH mechanism detection regexes contain overlapping whitespace sub-patterns that backtrack quadratically. A malicious or man-in-the-middle SMTP server can reply to EHLO with 250-AUTH, a long whitespace run and a non-matching token, blocking the Node.js event loop for tens of seconds to hours before authentication.
📍 영향받는 시스템
Nodemailer 3.0.0 ~ 10.0.12 버전
⚔️ 공격 벡터
악의적인 또는 중간자 공격(MitM)을 수행하는 SMTP 서버가 조작된 EHLO 응답을 전송
🛡️ 대응 방법
Nodemailer를 10.0.13 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 nodemailer의 버전이 10.0.13 미만인지 확인
npm list nodemailer | grep nodemailer