🇰🇷 한글 설명
Python의 urllib3 라이브러리에서 chunked 스트리밍 파서가 chunk-size 필드의 길이를 제한 없이 버퍼링하여 무제한 메모리를 할당할 수 있는 취약점입니다. 공격자가 악의적인 HTTP 서버를 통해 줄바꿈 없는 매우 긴 데이터를 전송할 경우 클라이언트 프로세스의 메모리가 고갈될 수 있습니다.
💡 쉬운 설명
인터넷 연결 라이브러리가 서버로부터 들어오는 데이터의 크기를 확인하지 않고 무작정 메모리에 담으려다 발생하는 문제입니다. 나쁜 서버가 끝도 없이 긴 데이터를 보내면 컴퓨터의 메모리가 가득 차서 프로그램이 멈출 수 있습니다.
🇺🇸 원문 (English)
urllib3 is an HTTP client library for Python. From 1.10.3 until 2.8.0, the HTTPResponse.read_chunked and HTTPResponse.stream methods can allocate unbounded memory because the streaming chunk parser buffers the chunk-size field until newline or EOF without a length bound. The trigger is that a malicious server returns Transfer-Encoding: chunked followed by a very long run of bytes without a newline. The attack mechanism is that a malicious HTTP server sends a very long unterminated chunk-size line. The impact is that unbounded memory allocation can exhaust the client process. This issue is fixed in version 2.8.0.
📍 영향받는 시스템
urllib3 버전 1.10.3부터 2.8.0 미만 버전
⚔️ 공격 벡터
악의적인 HTTP 서버가 Transfer-Encoding: chunked 헤더를 사용한 후 줄바꿈 없이 매우 긴 chunk-size 라인을 전송
🛡️ 대응 방법
urllib3 라이브러리를 2.8.0 이상의 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.8.0 미만인지 확인하여 취약 여부를 판단합니다.
pip show urllib3 | grep Version