CVE-2026-142020: Response.iter_lines() and Response.aiter_lines()
Source GCVE Database
Not known to be exploited · CVSS 5.9 Medium : upgrade to 2.18.0 when convenient.
Data as of 4 Dec 2026, 14:06 UTC
Thin evidence
One scorer or none| CNA (Pydantic) | CVSS 3.1 | 5.9 |
|---|
- Patch
- Available – fixed in 2.18.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 4 Dec 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.
What to do
Upgrade httpx2 to 2.18.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| pydantichttpx2 | Affected
| Fixed in
|
PyPIhttpx2pkg:pypi/httpx2Other threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to httpx2 version 2.18.0 or later, which includes a fix that limits buffered line length to 1,048,576 characters by default and raises a DecodingError if exceeded. Until upgrading, avoid using iter_lines() or aiter_lines() on untrusted responses. Instead, use iter_bytes() or aiter_bytes() with enforced size limits, or request uncompressed responses by setting the Accept-Encoding header to identity.
Description
The httpx2 library versions prior to 2.18.0 have a vulnerability in Response.iter_lines() and Response.aiter_lines() methods where buffered decoded text lines have no length limit. This allows a server to send a small compressed response that decompresses into a very large payload without line breaks, causing excessive memory consumption on the client side. The issue can lead to high memory usage and potential denial of service when streaming responses from untrusted origins. The vulnerability is fixed in version 2.18.0 by limiting the maximum buffered line length to 1,048,576 characters by default.