🇰🇷 한글 설명
urllib3 1.0부터 2.6.0 미만 버전의 스트리밍 API에서 고도로 압축된 데이터를 부적절하게 처리하는 취약점이 발견되었습니다. 압축된 응답을 해제하는 과정에서 요청된 청크 크기를 초과하는 데이터가 내부 버퍼에 쌓이게 되며, 이로 인해 과도한 CPU 사용량과 대규모 메모리 할당이 발생할 수 있습니다.
💡 쉬운 설명
매우 작게 압축된 파일을 풀 때, 컴퓨터가 이를 처리하느라 갑자기 엄청난 양의 메모리와 CPU를 사용하여 시스템이 느려지거나 멈출 수 있는 문제입니다. 공격자가 특수하게 조작된 압축 파일을 보내면 발생할 수 있습니다.
🇺🇸 원문 (English)
urllib3 is a user-friendly HTTP client library for Python. Starting in version 1.0 and prior to 2.6.0, the Streaming API improperly handles highly compressed data. urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once. When streaming a compressed response, urllib3 can perform decoding or decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd). The library must read compressed data from the network and decompress it until the requested chunk size is met. Any resulting decompressed data that exceeds the requested amount is held in an internal buffer for the next read operation. The decompression logic could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This can result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data.
📍 영향받는 시스템
urllib3 버전 1.0 이상 2.6.0 미만
⚔️ 공격 벡터
공격자가 조작된 고압축 Content-Encoding 헤더를 포함한 HTTP 응답을 전송하여 대상 시스템의 자원을 고갈시킴
🛡️ 대응 방법
urllib3 라이브러리를 2.6.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 Version 값이 2.6.0 미만이면 취약한 상태입니다.
pip show urllib3 | grep Version