Katalog CVE

CVE-2026-142020

ŚrednieCVSS 5.9
Opublikowano: Przetłumaczono: NVD NIST

Prawdopodobieństwo exploitacji (EPSS)

Niskie ryzyko
0.49%

Percentyl 44 - wyżej niż 44% wszystkich znanych CVE

Streszczenie

W bibliotece httpx2 funkcje Response.iter_lines() i Response.aiter_lines() buforowały zdekodowany tekst bez limitu długości linii. Serwer może zwrócić małe skompresowane ciało, które dekompresuje się do dużego ładunku bez separatorów linii, powodując trzymanie całego zdekodowanego ładunku w pamięci i liniowy wzrost zużycia pamięci.

Ocena ryzyka

Aplikacje strumieniujące odpowiedzi z niezaufanego źródła za pomocą iter_lines() lub aiter_lines() mogą zostać zmuszone do wyczerpania pamięci, co prowadzi do odmowy usługi. Problem dotyczy wersji httpx2 przed 2.18.0.

Rekomendacja

Zaktualizuj httpx2 do wersji 2.18.0 lub nowszej, która domyślnie ogranicza buforowaną linię do 1 048 576 znaków. Do czasu aktualizacji używaj iter_bytes()/aiter_bytes() z limitem rozmiaru lub nagłówka Accept-Encoding: identity.

Inne podatności w httpx2

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

Response.iter_lines() and Response.aiter_lines() in httpx2 buffered decoded text without any limit on the length of a line. A server can return a small compressed body that decompresses to a large payload with no line separators, making the client hold the whole decompressed payload in memory before yielding a line. A body of about 65 KiB that decompresses to 64 MiB raises peak memory to about 134 MiB, and memory grows linearly with the decompressed size. The per-chunk decompression limit added for CVE-2026-84382 does not bound this buffer. Applications are affected when they stream responses from an untrusted origin with iter_lines() or aiter_lines(), such as NDJSON consumers, log tailers or feed fetchers, using httpx2 before 2.18.0. The issue is fixed in 2.18.0, which limits a buffered line to 1,048,576 characters by default and raises DecodingError beyond it; max_line_length adjusts or disables the limit. Until then, stream untrusted responses with iter_bytes() or aiter_bytes() and enforce a size limit, or request Accept-Encoding: identity.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS