🔍 CVE-2026-39804

0.0
CVSS Score
UNKNOWN
2026-05-01
2026-06-17 10:42
✅ 완료

🇰🇷 한글 설명

mtrudel bandit의 WebSocket permessage-deflate 압축 기능 사용 시, 압축 해제된 데이터의 크기 제한이 없어 메모리 고갈을 유발할 수 있는 취약점입니다. 공격자가 매우 높은 압축률을 가진 프레임을 전송하면 서버의 메모리가 급격히 소모되어 서비스 거부(DoS) 상태에 빠질 수 있습니다.

💡 쉬운 설명

압축된 데이터를 풀 때 크기 제한을 두지 않아, 아주 작은 파일이 서버에서 엄청나게 큰 용량으로 불어나 메모리를 가득 채우는 공격입니다. 이로 인해 서버가 멈추거나 강제로 종료될 수 있습니다.

🇺🇸 원문 (English)

Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when WebSocket permessage-deflate compression is enabled. 'Elixir.Bandit.WebSocket.PerMessageDeflate':inflate/2 in lib/bandit/websocket/permessage_deflate.ex calls :zlib.inflate/2 with no output-size cap, then materializes the entire decompressed payload as a single binary via IO.iodata_to_binary/1. The websocket_options.max_frame_size option only bounds the on-the-wire (compressed) frame size, not the decompressed output. A high-ratio compressed frame (e.g. uniform data at ~1024:1 ratio) can stay well under any wire-size limit while forcing GiB-scale heap allocations in the connection process before any application code runs. An unauthenticated attacker who can open a WebSocket connection can send a single such frame to exhaust the BEAM node's memory and trigger an OOM kill. This vulnerability requires both Bandit's server-level websocket_options.compress and the per-upgrade compress: true option passed to WebSockAdapter.upgrade/4 to be enabled. Stock Phoenix and LiveView applications are not affected as they default to compress: false. This issue affects bandit: from 0.5.9 before 1.11.0.

📍 영향받는 시스템

bandit: 0.5.9 버전부터 1.11.0 미만 버전

⚔️ 공격 벡터

인증되지 않은 공격자가 압축률이 매우 높은 WebSocket 프레임을 전송하여 메모리 고갈 유도

🛡️ 대응 방법

bandit 라이브러리를 1.11.0 이상의 최신 버전으로 업데이트하거나, WebSocket 압축 설정을 비활성화합니다.

🔧 검증 코드

출력된 bandit의 버전이 1.11.0 미만인지 확인합니다.

Shell / Script
mix deps info bandit | grep -E 'bandit' | awk '{print $2}'

💻 영향받는 소프트웨어

IBM WebSphere Application Server