🇰🇷 한글 설명
urllib3의 압축 해제 기능에서 부분 읽기 시 전체 응답을 해제하는 취약점으로, Brotli 사용 시 두 번째 read() 호출 또는 drain_conn() 호출 후 전체 데이터가 해제될 수 있습니다. 이로 인해 클라이언트에서 매우 압축된 소량의 데이터를 한 번에 완전히 해제하여 과도한 CPU 사용과 대량의 메모리 할당이 발생합니다.
💡 쉬운 설명
urllib3 라이브러리가 압축된 파일의 일부만 받으려 할 때 실수로 전체를 풀어버리는 버그입니다. 이로 인해 컴퓨터의 CPU와 메모리가 갑자기 많이 사용되어 시스템이 느려질 수 있습니다.
🇺🇸 원문 (English)
urllib3 is an HTTP client library for Python. From 2.6.0 to before 2.7.0, urllib3 could decompress the whole response instead of the requested portion (1) during the second HTTPResponse.read(amt=N) call when the response was decompressed using the official Brotli library or (2) when HTTPResponse.drain_conn() was called after the response had been read and decompressed partially (compression algorithm did not matter here). These issues could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This could result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data) on the client side. This vulnerability is fixed in 2.7.0.
📍 영향받는 시스템
Python urllib3 버전 2.6.0 이상 2.7.0 미만을 사용하는 모든 시스템
⚔️ 공격 벡터
공격자가 압축된 응답을 포함한 악의적인 HTTP 요청을 보내 클라이언트의 CPU와 메모리를 고갈시키는 리소스 소진 공격
🛡️ 대응 방법
urllib3를 2.7.0 이상으로 즉시 업그레이드하세요.
🔧 검증 코드
Version 항목의 숫자가 2.7.0 이상이면 취약점이 패치된 것입니다.
pip show urllib3 | grep Version