CVE-2026-97689: urllib3 HTTPResponse.stream()/read_chunked() Buffers An Unbounded Chunk-size Vulnerability
HIGHCVE-2026-97689 is a HIGH httpresponse.stream()/read_chunked() buffers an unbounded chunk-size vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting urllib3 libraries in the PyPI ecosystem. The issue involves httpresponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory. Remediation is available by upgrading affected packages to version 2.8.0.
CVE-2026-97689 at a Glance
How to Fix CVE-2026-97689
To remediate this vulnerability, upgrade all affected urllib3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install urllib3>=2.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show urllib3
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-97689, inspect your installed packages using pip:
pip show urllib3
Analyze the terminal output to locate any version of urllib3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.0), your application is affected.
Note: The pip show urllib3 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where 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. In urllib3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-97689 Affected urllib3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
urllib3
|
PyPI |
≥ 1.10.3
< 2.8.0
|
2.8.0
|
References
Frequently Asked Questions
What is CVE-2026-97689?
Which urllib3 versions are affected?
What version fixes CVE-2026-97689?
Is urllib3 affected?
What CWE is associated with CVE-2026-97689?
How can I check PyPI dependencies for CVE-2026-97689?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vxq7-64xx-v4gw",
"modified" : "2026-09-30T14:46:18Z",
"published" : "2026-09-30T14:46:18Z",
"aliases" : [ "CVE-2026-97689" ],
"summary" : "urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory",
"details" : "## Impact\n\nurllib3's [streaming API](https://urllib3.readthedocs.io/en/2.7.0/advanced-usage.html#streaming-and-i-o) is designed for efficiently handling large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once. When decoding a [chunked-transfer-encoded response](https://httpwg.org/specs/rfc9112.html#chunked.encoding), this API reads each chunk's size field by buffering until it sees `\\n` or EOF.\n\nA malicious HTTP server can return `Transfer-Encoding: chunked` and then send a very long run of bytes without any newline, causing the streaming client to buffer that entire run before urllib3 can reject the chunk size as invalid and allocate more memory than intended.\n\nTo fix the issue, we'll reject chunk-size fields larger than 65536 bytes, as already done in the non-streaming case, which is currently handled by the Python standard library. Note that this only applies to reading the chunk-size field, not the chunk data, which is already handled correctly. Thus, there shouldn't be any impact for non-malicious servers.\n\n## Affected usages\n\nApplications and libraries using urllib3 versions earlier than 2.8.0 may be affected when streaming a chunked response from untrusted sources. Specifically, this affects the [read_chunked()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read_chunked) and [stream()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.stream) methods of the HTTPResponse object.\n\nThis also affects requests streaming API, which uses urllib3 under the hood.\n\n## Remediation\n\nUpgrade to urllib3 version 2.8.0 or later, where chunk-size fields larger than 65536 will be rejected. If upgrading is not immediately possible, consider reading the response at once using the [read()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read) method.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "urllib3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.10.3"
}, {
"fixed" : "2.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-97689"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/commit/cd770b059b543be29298ea5c52afb0b1b090f5ed"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/urllib3/urllib3"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/releases/tag/2.8.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-30T14:46:18Z",
"nvd_published_at" : "2026-09-29T16:17:18Z"
}
}