Średnia

urllib3: Chunked Deflate streaming can enter an infinite loop

  • Ujawniono: 30.09.2026
  • Aktualizacja: 11.10.2026 15:18

Impact

urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once.

urllib3 can decompress response bodies according to the HTTP Content-Encoding header. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk.

However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network.

A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required.

Affected usages

Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met:

  1. Compressed responses from an untrusted source are streamed using HTTPResponse.stream(amt=N) or HTTPResponse.read_chunked(amt=N) with a positive, finite chunk size.
  2. Content decoding is enabled.
  3. The response uses both Transfer-Encoding: chunked and Content-Encoding: deflate.
  4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream.

HTTPResponse.stream() uses a finite chunk size by default and is therefore affected when the other conditions are met.

Remediation

Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer reports trailing bytes as data that can produce more decoded output.

If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting decode_content=False, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Python (PyPI) urllib3 >= 2.6.2, < 2.8.0 2.8.0

Odnośniki

Ocena CVSS -
Wektor CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Słabość (CWE)
CWE-835
Platforma
Python (PyPI)
Paczka
urllib3
Ujawniono
30.09.2026
Aktualizacja
11.10.2026 15:18

Źródła i licencje

OSV / GitHub Advisory Database - PYSEC-2026-4176 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-gh4c-6fx4-qh6g - CC BY 4.0

Historia podatności: urllib3

Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (22) w archiwum
Wszystkich wpisów
22
Pierwsza → ostatnia
01.2017 09.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 1
  • Wysoka 11
  • Średnia 10

Ujawnienia w latach

  1. 2017: 1
  2. 2018: 1
  3. 2019: 2
  4. 2020: 2
  5. 2021: 2
  6. 2022: 0
  7. 2023: 3
  8. 2024: 1
  9. 2025: 4
  10. 2026: 6
Istotność:
  1. urllib3: Chunked Deflate streaming can enter an infinite loop ten wpis
    Średnia CVE-2026-97688 >= 2.6.2, < 2.8.0 2.8.0
  2. Wysoka CVE-2026-97687 >= 1.26.0, < 2.8.0 2.8.0
  3. Wysoka · 7.5 CVE-2026-44432 >= 2.6.0, < 2.7.0 2.7.0
  4. Wysoka CVE-2025-66471 >= 1.0, < 2.6.0 2.6.0
  5. Wysoka CVE-2025-66418 >= 1.24, < 2.6.0 2.6.0
  6. Wysoka · 5.9 CVE-2023-43804 >= 2.0.0, < 2.0.6, < 1.26.17 2.0.6, 1.26.17
  7. Wysoka · 7.5 CVE-2020-7212 >= 1.25.2, < 1.25.8 1.25.8
  8. Wysoka · 7.5 CVE-2019-11324 < 1.24.2 1.24.2
  9. Krytyczna · 9.8 CVE-2018-20060 < 1.23 1.23

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.