Pydantic Httpx2 up to 2.17.x Line Iteration Response.iter_lines/Response.aiter_lines allocation of resources
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.5 | $0-$5k | 0.00+ |
Summary
A vulnerability was found in Pydantic Httpx2 up to 2.17.x. It has been classified as problematic. This affects the function Response.iter_lines/Response.aiter_lines of the component Line Iteration. The manipulation leads to allocation of resources.
This vulnerability is traded as CVE-2026-142020. It is possible to initiate the attack remotely. There is no exploit available.
Upgrading the affected component is recommended.
Details
A vulnerability was found in Pydantic Httpx2 up to 2.17.x and classified as problematic. This issue affects the function Response.iter_lines/Response.aiter_lines of the component Line Iteration. The manipulation with an unknown input leads to a allocation of resources vulnerability. Using CWE to declare the problem leads to CWE-770. The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. Impacted is availability. The summary by CVE is:
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.
It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2026-142020 since 12/04/2026. The exploitation is known to be easy. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details of the vulnerability are known, but there is no available exploit. The attack technique deployed by this issue is T1499 according to MITRE ATT&CK.
Upgrading to version 2.18.0 eliminates this vulnerability.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Product
Vendor
Name
Version
Website
- Product: https://github.com/pydantic/httpx2/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.6VulDB Meta Temp Score: 5.5
VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 5.9
CNA Vector (Pydantic): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Allocation of resourcesCWE: CWE-770 / CWE-400 / CWE-404
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Httpx2 2.18.0
Timeline
12/04/2026 Advisory disclosed12/04/2026 CVE reserved
12/04/2026 VulDB entry created
12/04/2026 VulDB entry last update
Sources
Product: github.comAdvisory: github.com
Status: Confirmed
CNA: Pydantic
CVE: CVE-2026-142020 (🔒)
GCVE (CVE): GCVE-0-2026-142020
GCVE (VulDB): GCVE-100-449699
Entry
Created: 12/04/2026 12:53Changes: 12/04/2026 12:53 (65)
Complete: 🔍
Cache ID: 216::103
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.