🇰🇷 한글 설명
postal-mime 4.2.1 이전 버전의 PostalMime.processLine() 함수에는 알고리즘 복잡도 기반 서비스 거부(DoS) 취약점이 있습니다. 공격자는 긴 공통 접두사를 가진 경계 라인을 깊게 중첩된 multipart 이메일로 구성해 CPU 사용량을 과도하게 늘릴 수 있습니다. 이로 인해 Node.js 이벤트 루프가 메시지당 수 초간 차단될 수 있습니다.
💡 쉬운 설명
이메일 파싱 라이브러리가 특수하게 조작된 이메일을 처리할 때 지나치게 많은 계산을 하게 되는 문제입니다. 악성 이메일 몇 통만으로도 서버가 몇 초씩 멈춰 다른 요청을 처리하지 못할 수 있습니다.
🇺🇸 원문 (English)
postal-mime before 4.2.1 contains an algorithmic complexity denial of service vulnerability that allows unauthenticated remote attackers to cause excessive CPU consumption in the PostalMime.processLine() function by crafting deeply nested multipart email messages with boundary lines sharing long prefixes with open boundaries. Attackers can deliver a malicious email with nesting up to the default maxNestingDepth of 256, causing per-line parsing cost to scale as O(depth x shared prefix length) and blocking the Node.js event loop for seconds per message.
📍 영향받는 시스템
postal-mime 4.2.1 미만을 사용하는 Node.js 기반 이메일 파싱 애플리케이션
⚔️ 공격 벡터
원격의 인증되지 않은 공격자가 깊게 중첩되고 긴 공통 접두사를 가진 경계선을 포함한 악성 이메일을 대상 시스템으로 전송
🛡️ 대응 방법
postal-mime 패키지를 4.2.1 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 4.2.1 미만이면 취약하며, 4.2.1 이상이면 패치된 상태입니다. 아무 결과도 없으면 해당 프로젝트에 postal-mime이 설치되어 있지 않습니다.
npm ls postal-mime 2>/dev/null; grep -h '"version"' node_modules/postal-mime/package.json 2>/dev/null