Skip to main content
VulnerabilityPublished

CVE-2026-142020: pydantic httpx2 · Data Amplification

Affects pydantic httpx2Source CVE Database V5

0
Compare

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

CVSS 3.1 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (Pydantic)CVSS 3.15.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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 4 Dec 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
pydantichttpx2Affected
  • <2.18.0
Fixed in
  • 2.18.0
PyPIhttpx2pkg:pypi/httpx2Other threatsAffected
  • <2.18.0
Fixed in
  • 2.18.0

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.

References

Community reviews

Loading reviews…