EnvMap GitHub

CVE-2026-142020

Unbounded iter_lines() and aiter_lines() buffering enables memory exhaustion via decompression amplification

Received

Description

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.

In the words of the organisation that published it (Pydantic).

Severity

  • 5.9 Medium · CVSS 3.1 from 7cec5f2f-3032-4006-8740-31f605ffab5f · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected

  • pydantic httpx2: before 2.18.0

as the publisher (Pydantic) lists them.

Weakness

CWE-409

References

Record

Published12:18 UTC, 4 December 2026
Last changed12:18 UTC, 4 December 2026
NVD statusReceived
Published byPydantic

CVE-2026-142020 on NVD · on CVE.org · Security Briefing

Follow it

Add the feed to a feed reader and new items arrive there as they are published, with no account here and no email.

Add to Feedly Add to Inoreader

Any other reader: paste https://envmap.tech/security/feed.xml

Where this comes from

Nothing here is written by an AI, summarised or rewritten: a headline is its newsroom's own and opens its story. A description is in the words of the organisation that published the CVE; a score says whose it is, NVD's or the publisher's; a CVE nobody has scored yet says so. A CVE that is rejected comes off every list. When a source does not answer, the page keeps the last answer it gave and says since when.

How to read it

EnvMap is a free, open-source DevOps control plane that you run yourself; its Security page brings your scanners' findings into one place. See what it does.