🇰🇷 한글 설명
Ruby의 Net::IMAP 라이브러리의 응답 파서에서 악의적인 서버로부터 전송된 압축된 uid-set 데이터를 제한 없이 배열로 확장하여 메모리 소진 DoS 공격이 가능합니다. 버전 0.3.2~0.3.7, 0.4.x~0.4.18, 0.5.x~0.5.5가 영향을 받으며, 0.3.8, 0.4.19, 0.5.6 이상에서 수정되었습니다.
💡 쉬운 설명
Ruby의 이메일 IMAP 라이브러리가 악의적인 이메일 서버로부터 특수하게 만들어진 데이터를 받으면 메모리를 모두 사용해서 프로그램이 다운될 수 있습니다. 이를 해결하려면 라이브러리를 최신 버전으로 업데이트해야 합니다.
🇺🇸 원문 (English)
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Starting in version 0.3.2 and prior to versions 0.3.8, 0.4.19, and 0.5.6, there is a possibility for denial of service by memory exhaustion in `net-imap`'s response parser. At any time while the client is connected, a malicious server can send can send highly compressed `uid-set` data which is automatically read by the client's receiver thread. The response parser uses `Range#to_a` to convert the `uid-set` data into arrays of integers, with no limitation on the expanded size of the ranges. Versions 0.3.8, 0.4.19, 0.5.6, and higher fix this issue. Additional details for proper configuration of fixed versions and backward compatibility are available in the GitHub Security Advisory.
📍 영향받는 시스템
Ruby net-imap 0.3.2-0.3.7, 0.4.0-0.4.18, 0.5.0-0.5.5
⚔️ 공격 벡터
IMAP 클라이언트가 악의적인 서버에 연결된 상태에서 압축된 uid-set 데이터 전송으로 메모리 소진 유발
🛡️ 대응 방법
net-imap을 0.3.8, 0.4.19, 0.5.6 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 0.3.8, 0.4.19, 0.5.6 이상이면 안전, 이하면 취약 상태
gem list net-imap 2>/dev/null | grep net-imap