{"api_version":"1","generated_at":"2026-12-04T14:45:53+00:00","cve":"CVE-2026-142020","urls":{"html":"https://cve.report/CVE-2026-142020","api":"https://cve.report/api/cve/CVE-2026-142020.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-142020","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-142020"},"summary":{"title":"Unbounded iter_lines() and aiter_lines() buffering enables memory exhaustion via decompression amplification","description":"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.\n\nApplications 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.\n\nThe 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.","state":"PUBLISHED","assigner":"Pydantic","published_at":"2026-12-04 12:18:35","updated_at":"2026-12-04 12:18:35"},"problem_types":["CWE-409","CWE-409 CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)"],"metrics":[{"version":"3.1","source":"7cec5f2f-3032-4006-8740-31f605ffab5f","type":"Secondary","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"baseScore":5.9,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/pydantic/httpx2/security/advisories/GHSA-8xx6-hgc6-gc2m","name":"https://github.com/pydantic/httpx2/security/advisories/GHSA-8xx6-hgc6-gc2m","refsource":"7cec5f2f-3032-4006-8740-31f605ffab5f","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/pydantic/httpx2/security/advisories/GHSA-9333-m6rv-gmq9","name":"https://github.com/pydantic/httpx2/security/advisories/GHSA-9333-m6rv-gmq9","refsource":"7cec5f2f-3032-4006-8740-31f605ffab5f","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-142020","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142020","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"pydantic","product":"httpx2","version":"affected 2.18.0 python","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"manus-pi","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"collectionURL":"https://pypi.org","defaultStatus":"unaffected","packageName":"httpx2","product":"httpx2","repo":"https://github.com/pydantic/httpx2","vendor":"pydantic","versions":[{"lessThan":"2.18.0","status":"affected","version":"0","versionType":"python"}]}],"credits":[{"lang":"en","type":"reporter","value":"manus-pi"}],"descriptions":[{"lang":"en","value":"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.\n\nApplications 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.\n\nThe 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."}],"metrics":[{"cvssV3_1":{"baseScore":5.9,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-409","description":"CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-12-04T11:28:05.396Z","orgId":"7cec5f2f-3032-4006-8740-31f605ffab5f","shortName":"Pydantic"},"references":[{"tags":["vendor-advisory"],"url":"https://github.com/pydantic/httpx2/security/advisories/GHSA-9333-m6rv-gmq9"},{"url":"https://github.com/pydantic/httpx2/security/advisories/GHSA-8xx6-hgc6-gc2m"}],"source":{"advisory":"GHSA-9333-m6rv-gmq9","discovery":"UNKNOWN"},"title":"Unbounded iter_lines() and aiter_lines() buffering enables memory exhaustion via decompression amplification"}},"cveMetadata":{"assignerOrgId":"7cec5f2f-3032-4006-8740-31f605ffab5f","assignerShortName":"Pydantic","cveId":"CVE-2026-142020","datePublished":"2026-12-04T11:28:05.396Z","dateReserved":"2026-12-04T11:23:39.757Z","dateUpdated":"2026-12-04T11:28:05.396Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-04 12:18:35","lastModifiedDate":"2026-12-04 12:18:35","problem_types":["CWE-409","CWE-409 CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)"],"metrics":{"cvssMetricV31":[{"source":"7cec5f2f-3032-4006-8740-31f605ffab5f","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":2.2,"impactScore":3.6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"142020","Ordinal":"1","Title":"Unbounded iter_lines() and aiter_lines() buffering enables memor","CVE":"CVE-2026-142020","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"142020","Ordinal":"1","NoteData":"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.\n\nApplications 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.\n\nThe 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.","Type":"Description","Title":"Unbounded iter_lines() and aiter_lines() buffering enables memor"}]}}}