Skip to main content
VulnerabilityPublished

CVE-2026-142020: Response.iter_lines() and Response.aiter_lines()

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-142020· Medium 5.9

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

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 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

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.

References

Community reviews

Loading reviews…