CVE Professor
/
All CVEs
CVE-2026-142020

CVE-2026-142020 — Pydantic Httpx2 (2.18.0) — CWE-409

MEDIUM CVSS 5.9 CIRCL

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.

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.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-142020
CVSS 5.9/10 · MEDIUM · 04.12.2026
CWE: CWE-409
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Summary: 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 …
Affected: pydantic httpx2

⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · no user interaction (UI:N).

🌍 REAL WORLD IMPACT
All confidential data readable/stealable; service can be completely taken down.

🛡️ REMEDIATION
→ Apply vendor security update for pydantic httpx2.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
📋 Routine update cycle (30 days)

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="pydantic httpx2"
CVSS Score
5.9 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-409
Affected Products (1)
pydantic:httpx2 (2.18.0)
References & Advisories (3)
Related CVEs
6.5
CVE-2026-77398
LabelU is a data annotation platform designed for handling multimodal data. Prior to version 1.5.3, the sort v
5.3
CVE-2026-132651
httpx2 reassembled fragmented WebSocket messages by appending each continuation frame to a bytes buffer, copyi
3.7
CVE-2026-140868
When following a redirect to a different origin, httpx2 removes the Authorization and Cookie headers but keeps
7.5
CVE-2026-76813
CKAN MCP Server is a tool for querying CKAN open data portals. Prior to version 0.4.111, makeCkanRequest fetch
6.5
CVE-2026-142501
libheif 1.19.0 before 1.23.6 contains a CPU exhaustion vulnerability in the uncompressed (unci) codec that re-
5.9
CVE-2026-142228
Encode httpx through 0.29.0 contains an unbounded decompression vulnerability that allows malicious servers to
5.9
CVE-2026-142242
JJWT through 0.13.0 contains an unbounded decompression vulnerability in DefaultJwtParser that allows unauthen