🇰🇷 한글 설명
Gleam 웹 서버인 ewe의 handle_trailers 함수에서 잘못된 트레일러 헤더를 처리할 때 무한 루프가 발생하는 취약점입니다. 거부된 헤더를 건너뛰지 못하고 동일한 버퍼를 반복 재귀 호출함으로써 BEAM 프로세스가 100% CPU를 점유하며 멈추게 됩니다. 이 문제는 인증되지 않은 원격 클라이언트에 의해 악용될 수 있습니다.
💡 쉬운 설명
웹 서버가 잘못된 데이터 형식을 받았을 때 이를 처리하지 못하고 똑같은 작업을 무한히 반복하는 문제입니다. 이로 인해 서버의 CPU 사용량이 100%로 치솟으며 서비스가 마비될 수 있습니다.
🇺🇸 원문 (English)
ewe is a Gleam web server. Versions 0.8.0 through 3.0.4 contain a bug in the handle_trailers function where rejected trailer headers (forbidden or undeclared) cause an infinite loop. When handle_trailers encounters such a trailer, three code paths (lines 520, 523, 526) recurse with the original buffer (rest) instead of advancing past the rejected header (Buffer(header_rest, 0)), causing decoder.decode_packet to re-parse the same header on every iteration. The resulting loop has no timeout or escape — the BEAM process permanently wedges at 100% CPU. Any application that calls ewe.read_body on chunked requests is affected, and this is exploitable by any unauthenticated remote client before control returns to application code, making an application-level workaround impossible. This issue is fixed in version 3.0.5.
📍 영향받는 시스템
ewe 버전 0.8.0 ~ 3.0.4
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 조작된 트레일러 헤더를 포함한 chunked 요청을 전송
🛡️ 대응 방법
ewe 버전을 3.0.5 이상으로 업데이트
🔧 검증 코드
출력된 ewe의 버전이 3.0.5 미만인지 확인하여 취약 여부를 판단합니다.
mix list | grep ewe || echo 'Not installed'