# CVE-2026-142230: httpx2 through 2.17.0 Memory Exhaustion via iter_lines and aiter_lines

Source: https://aplosec.si/cve/CVE-2026-142230/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142230

High 8.2 · Reported · No fix listed · CWE-770 · PyPI

# httpx2 through 2.17.0 Memory Exhaustion via iter_lines and aiter_lines

CVE-2026-142230 · published 2026-12-02

In plain words: this type of bug lets someone slow down or crash the service with crafted input (denial of service). No fixed release is listed yet.

## Summary

CVE-2026-142230 affects httpx2 (PyPI) <= 2.17.0: Memory Exhaustion via iter_lines and aiter_lines (CWE-770). No fixed release is listed. CVSS 4.0 base score 8.2 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

Pydantic httpx2 through 2.17.0 contains an unbounded memory allocation vulnerability in LineDecoder that allows malicious servers to exhaust client memory by sending decompressed bodies without newlines. Attackers can return highly compressed gzip, deflate, brotli or zstd responses that inflate roughly 1000 to 1, terminating clients reading via iter_lines() or aiter_lines().

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/httpx2-through-2.17.0-memory-exhaustion-via-iter-lines-and-aiter-lines](https://www.vulncheck.com/advisories/httpx2-through-2.17.0-memory-exhaustion-via-iter-lines-and-aiter-lines)

- [Vulnerable codehttps://github.com/pydantic/httpx2/blob/v2.17.0/src/httpx2/httpx2/_decoders.py#L387-L435](https://github.com/pydantic/httpx2/blob/v2.17.0/src/httpx2/httpx2/_decoders.py#L387-L435)

- [Vulnerable codehttps://github.com/pydantic/httpx2/blob/v2.17.0/src/httpx2/httpx2/_models.py#L934-L941](https://github.com/pydantic/httpx2/blob/v2.17.0/src/httpx2/httpx2/_models.py#L934-L941)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142230](https://www.cve.org/CVERecord?id=CVE-2026-142230)

**Severity:** High 8.2 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142230)

**Package:** httpx2

**Ecosystem:** PyPI

**Affected:** <= 2.17.0

**Fixed:** None

**Weakness:** CWE-770

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
