CVE-2026-142020: pydantic httpx2 · Data Amplification
Affects pydantic httpx2Source CVE Database V5
Not known to be exploited · CVSS 5.9 Medium : upgrade to 2.18.0 when convenient.
Data as of 4 Dec 2026, 12:19 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 pydantic 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
This issue is fixed in httpx2 version 2.18.0, which limits buffered line length by default and raises an error if exceeded. Users should upgrade to version 2.18.0 or later to remediate this vulnerability. Until then, it is recommended to avoid using iter_lines() or aiter_lines() with untrusted responses. Instead, stream responses using iter_bytes() or aiter_bytes() with enforced size limits, or request uncompressed responses by setting the Accept-Encoding header to identity.
Description
CVE-2026-142020 is a vulnerability in the httpx2 library used by pydantic that involves improper handling of highly compressed data during response streaming. The iter_lines() and aiter_lines() methods buffer decoded text without limiting line length, allowing a small compressed response to decompress into a very large payload without line breaks. This can cause excessive memory consumption on the client side when processing untrusted streamed responses. The issue affects versions of httpx2 before 2.18.0 and is fixed in 2.18.0 by limiting buffered line length to 1,048,576 characters by default.