🇰🇷 한글 설명
Python HTTP 클라이언트인 Zapros 0.14.0 미만 버전에서 메모리 고갈로 인한 서비스 거부(DoS) 취약점이 발견되었습니다. 압축된 응답을 처리할 때 사용자가 설정한 청크 크기 제한을 디코더가 무시하여, 매우 큰 데이터가 유입될 경우 메모리가 초과될 수 있습니다.
💡 쉬운 설명
인터넷에서 데이터를 받아올 때, 공격자가 아주 큰 압축 파일을 보내면 프로그램이 이를 풀다가 컴퓨터의 메모리를 모두 써버려 멈추게 되는 문제입니다. 이를 통해 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
Zapros, a Python HTTP client, prior to version 0.14.0 is vulnerable to denial of service via memory exhaustion. The issue affects all callers who streamed compressed responses relying on the chunk size — explicit (`iter_bytes(chunk_size=...)`) or the default — to bound memory. The decoder ignored that bound, so a chunk could be far larger than requested and a single compressed response could overflow memory. Version 0.14.0 contains a patch. Some workarounds are available. Read the still-compressed body with `Response.iter_raw()` / `Response.async_iter_raw()`, which bypass the built-in decoders, and decompress it yourself with an explicit output-size bound (e.g. `zlib`'s `max_length`), aborting once a configured limit is exceeded. Where feasible, send `Accept-Encoding: identity` to disable response compression so bodies are not decompressed client-side. Avoid decoding response bodies from untrusted servers.
📍 영향받는 시스템
Zapros Python HTTP client version < 0.14.0
⚔️ 공격 벡터
압축된 응답의 크기를 조작하여 클라이언트의 메모리 할당 제한을 우회하는 방식
🛡️ 대응 방법
Zapros를 0.14.0 이상 버전으로 업데이트하거나, 신뢰할 수 없는 서버의 응답 디코딩을 피하고 직접 크기 제한을 두어 압축을 해제해야 합니다.
🔧 검증 코드
출력된 버전이 0.14.0 미만이면 해당 취약점에 노출된 상태입니다.
pip show zapros | grep Version