Repository navigation
[CU-86b4umhm1] Update dependency urllib3 to v2 [SECURITY] - #104
Open
dnastack-renovate[bot] wants to merge 1 commit into
Open
dnastack-renovate[bot] wants to merge 1 commit into
dnastack-renovate[bot] wants to merge 1 commit into
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
2 times, most recently
from
October 1, 2025 15:30
23dcc83 to
0a4e3c5
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
4 times, most recently
from
October 14, 2025 15:11
ea56bf4 to
fc8f06e
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
5 times, most recently
from
October 21, 2025 20:00
16b76fd to
9d9a9c5
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
6 times, most recently
from
October 28, 2025 20:45
f464f21 to
bce36bc
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
November 4, 2025 21:33
bce36bc to
67e564e
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
November 12, 2025 00:39
67e564e to
a141283
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
December 6, 2025 08:38
a141283 to
87fe80c
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
January 8, 2026 07:45
87fe80c to
6d77611
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
+ Coverage 59.59% 60.41% +0.81%
==========================================
Files 180 183 +3
Lines 11056 11244 +188
==========================================
+ Hits 6589 6793 +204
+ Misses 4467 4451 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
5 times, most recently
from
January 30, 2026 16:31
a0e5477 to
e0279e0
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
3 times, most recently
from
February 10, 2026 19:30
27444f8 to
40c60bd
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
4 times, most recently
from
February 27, 2026 19:26
34f37e1 to
434ab89
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
3 times, most recently
from
March 20, 2026 20:23
8dde225 to
7fe4f78
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
2 times, most recently
from
March 25, 2026 21:37
2ba3bb7 to
d7f5c2c
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
April 1, 2026 19:52
d7f5c2c to
61e9f54
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
April 15, 2026 21:19
61e9f54 to
3ce784c
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
April 23, 2026 20:26
3ce784c to
802af7f
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
2 times, most recently
from
May 5, 2026 17:16
1752645 to
8ab7262
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
May 11, 2026 17:34
8ab7262 to
c0de71e
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
June 16, 2026 16:43
c0de71e to
d2bf947
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
3 times, most recently
from
July 6, 2026 20:21
f8b9361 to
4cc820f
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
July 20, 2026 13:52
4cc820f to
d99e066
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
July 27, 2026 15:52
d99e066 to
faab693
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
August 17, 2026 13:12
faab693 to
3cc5ecb
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
September 30, 2026 18:54
3cc5ecb to
6cbab9d
Compare
dnastack-renovate
Bot
force-pushed
the
renovate/pypi-urllib3-vulnerability
branch
from
October 1, 2026 20:01
6cbab9d to
ba49fcc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
>=1.25.11,<2→>=2.8,<3GitHub Vulnerability Alerts
CVE-2025-50181
urllib3 handles redirects and retries using the same mechanism, which is controlled by the
Retryobject. The most common way to disable redirects is at the request level, as follows:However, it is also possible to disable redirects, for all requests, by instantiating a
PoolManagerand specifyingretriesin a way that disable redirects:However, the
retriesparameter is currently ignored, which means all the above examples don't disable redirects.Affected usages
Passing
retriesonPoolManagerinstantiation to disable redirects or restrict their number.By default, requests and botocore users are not affected.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable.
Remediation
You can remediate this vulnerability with the following steps:
request()level instead of thePoolManager()level.CVE-2025-66418
Impact
urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g.,
Content-Encoding: gzip, zstd).However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.
Remediation
Upgrade to at least urllib3 v2.6.0 in which the library limits the number of links to 5.
If upgrading is not immediately possible, use
preload_content=Falseand ensure thatresp.headers["content-encoding"]contains a safe number of encodings before reading the response content.CVE-2025-66471
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
When streaming a compressed response, urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). The library must read compressed data from the network and decompress it until the requested chunk size is met. Any resulting decompressed data that exceeds the requested amount is held in an internal buffer for the next read operation.The decompression logic could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This can result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side, even if the application only requested a small chunk of data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier to stream large compressed responses or content from untrusted sources.
stream(),read(amt=256),read1(amt=256),read_chunked(amt=256),readinto(b)are examples ofurllib3.HTTPResponsemethod calls using the affected logic unless decoding is disabled explicitly.Remediation
Upgrade to at least urllib3 v2.6.0 in which the library avoids decompressing data that exceeds the requested amount.
If your environment contains a package facilitating the Brotli encoding, upgrade to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 too. These versions are enforced by the
urllib3[brotli]extra in the patched versions of urllib3.Credits
The issue was reported by @Cycloctane.
Supplemental information was provided by @stamparm during a security audit performed by 7ASecurity and facilitated by OSTIF.
CVE-2026-21441
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). When using the streaming API, the library decompresses only the necessary bytes, enabling partial content consumption.However, for HTTP redirect responses, the library would read the entire response body to drain the connection and decompress the content unnecessarily. This decompression occurred even before any read methods were called, and configured read limits did not restrict the amount of decompressed data. As a result, there was no safeguard against decompression bombs. A malicious server could exploit this to trigger excessive resource consumption on the client (high CPU usage and large memory allocations for decompressed data; CWE-409).
Affected usages
Applications and libraries using urllib3 version 2.6.2 and earlier to stream content from untrusted sources by setting
preload_content=Falsewhen they do not disable redirects.Remediation
Upgrade to at least urllib3 v2.6.3 in which the library does not decode content of redirect responses when
preload_content=False.If upgrading is not immediately possible, disable redirects by setting
redirect=Falsefor requests to untrusted source.CVE-2026-44431
Impact
When following cross-origin redirects for requests made using urllib3’s high-level APIs, such as
urllib3.request(),PoolManager.request(), andProxyManager.request(), sensitive headers —Authorization,Cookie, andProxy-Authorization(defined inRetry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT) — are stripped by default, as expected.However, cross-origin redirects followed from the low-level API via
ProxyManager.connection_from_url().urlopen(..., assert_same_host=False)still forward these sensitive headers.Affected usage
Applications and libraries using urllib3 versions earlier than 2.7.0 may be affected if they allow cross-origin redirects while making requests through
HTTPConnection.urlopen()instances created viaProxyManager.connection_from_url().Remediation
Upgrade to urllib3 version 2.7.0 or later, in which sensitive headers are stripped from redirects followed by
HTTPConnection.If upgrading is not immediately possible, avoid using this low-level redirect flow for cross-origin redirects. If appropriate for your use case, switch to
ProxyManager.request().CVE-2026-97689
Impact
urllib3's streaming API 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, this API reads each chunk's size field by buffering until it sees
\nor EOF.A malicious HTTP server can return
Transfer-Encoding: chunkedand 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.To 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.
Affected usages
Applications 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() and stream() methods of the HTTPResponse object.
This also affects requests streaming API, which uses urllib3 under the hood.
Remediation
Upgrade 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() method.
CVE-2026-97687
Impact
urllib3 supports configuring TLS independently for an HTTPS proxy and the target server.
proxy_ssl_context,proxy_assert_hostname, andproxy_assert_fingerprintconfigure the TLS connection to the proxy.ssl_contextand the other target-specific TLS parameters configure the connection to the target server.In urllib3 versions 1.26.0 through 2.7.0, these configurations were not consistently separated. Depending on the proxy mode, urllib3 could:
proxy_ssl_contextand use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.In particular, configuring
cert_reqs="CERT_NONE"for a target server could overwrite theverify_modeof the SSL context configured for the HTTPS proxy. This modification occurred in place and persisted on the context object, potentially disabling proxy certificate verification for later connections that reused the same context.An attacker able to intercept the connection to an HTTPS proxy may be able to impersonate the proxy when the effective proxy TLS configuration disables certificate verification or otherwise accepts the attacker's certificate. This may occur, for example, when the target server's trust or identity policy is incorrectly applied to the proxy connection.
When HTTPS forwarding is enabled, an impersonated proxy can observe or modify forwarded requests and responses, potentially exposing credentials, authentication tokens, request bodies, response data, and other sensitive information.
A TLS client certificate intended for the target server may also be presented to the proxy or to an attacker impersonating it. This can disclose the client's identity and provide proof of possession of the corresponding private key. The private key itself is not transmitted during the TLS handshake.
In CONNECT tunneling mode, impersonating the HTTPS proxy does not by itself defeat the separate end-to-end TLS connection between the client and the target server.
Affected Usages
Code using urllib3 versions 1.26.0 through 2.7.0 may be affected in any of the following cases.
1. The target SSL context is used for an HTTPS forwarding proxy
HTTPS requests are forwarded through an HTTPS proxy with
use_forwarding_for_https=True, andproxy_ssl_contextis configured for the proxy.urllib3 may ignore
proxy_ssl_contextand use the target server'sssl_contextfor the proxy TLS handshake. The proxy may therefore be verified using the target server's trust and certificate policy instead of the policy explicitly configured for the proxy.2. The target verification policy overrides the proxy policy
An HTTPS proxy is configured with
proxy_ssl_context, while the target server uses a different certificate-verification policy.urllib3 may apply the target server's
cert_reqsvalue to the proxy SSL context. For example, settingcert_reqs="CERT_NONE"for the target server may also disable certificate verification for the HTTPS proxy, even whenproxy_ssl_contextwas configured to require verification.This issue can affect the TLS connection to an HTTPS proxy in both forwarding and CONNECT tunneling configurations.
3. A mutated proxy SSL context is reused
The same SSL context is reused as
proxy_ssl_contextacross multiple connections, and certificate verification is disabled for one target server.urllib3 may modify the proxy SSL context's
verify_modein place. Later connections that reuse the same context may therefore connect to the HTTPS proxy without certificate verification.4. Target-specific TLS identity or credentials are applied to the proxy
HTTPS requests are forwarded through an HTTPS proxy with
use_forwarding_for_https=True, and target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials are configured.urllib3 may apply these target-specific settings to the proxy TLS handshake. This may cause urllib3 to:
Code connecting through a plain HTTP proxy does not establish a TLS connection to the proxy and is not affected by this issue.
Remediation
Upgrade to urllib3 2.8.0 or later.
urllib3 2.8.0 independently applies the explicitly configured
proxy_ssl_contextand proxy-specific certificate assertions to the HTTPS proxy connection. Target-specific SNI, certificate assertions, and TLS client certificate parameters are no longer applied to the HTTPS proxy handshake.For backward compatibility, when an HTTPS proxy is used with
use_forwarding_for_https=Trueandproxy_ssl_contextis not provided, urllib3 2.8.0 continues to usessl_contextfor the TLS connection to the proxy. This configuration emits aFutureWarning. In urllib3 3.0, passingssl_contextwithuse_forwarding_for_https=Truefor an HTTPS proxy will raise an error. Applications should useproxy_ssl_contextto configure TLS for an HTTPS forwarding proxy.The fixes were implemented in commits b6447295fff7b38fdffc67e0df9712d60cef3cc3 and 07408cec79d1856d81bb42c74a904a24fdb9e465.
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
CVE-2025-50181 / GHSA-pq67-6m6q-mj2v / PYSEC-2026-1999
More information
Details
urllib3 handles redirects and retries using the same mechanism, which is controlled by the
Retryobject. The most common way to disable redirects is at the request level, as follows:However, it is also possible to disable redirects, for all requests, by instantiating a
PoolManagerand specifyingretriesin a way that disable redirects:However, the
retriesparameter is currently ignored, which means all the above examples don't disable redirects.Affected usages
Passing
retriesonPoolManagerinstantiation to disable redirects or restrict their number.By default, requests and botocore users are not affected.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable.
Remediation
You can remediate this vulnerability with the following steps:
request()level instead of thePoolManager()level.Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
CVE-2025-50181 / GHSA-pq67-6m6q-mj2v / PYSEC-2026-1999
More information
Details
urllib3 handles redirects and retries using the same mechanism, which is controlled by the
Retryobject. The most common way to disable redirects is at the request level, as follows:However, it is also possible to disable redirects, for all requests, by instantiating a
PoolManagerand specifyingretriesin a way that disable redirects:However, the
retriesparameter is currently ignored, which means all the above examples don't disable redirects.Affected usages
Passing
retriesonPoolManagerinstantiation to disable redirects or restrict their number.By default, requests and botocore users are not affected.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable.
Remediation
You can remediate this vulnerability with the following steps:
request()level instead of thePoolManager()level.Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
urllib3 streaming API improperly handles highly compressed data
CVE-2025-66471 / GHSA-2xpw-w6gg-jr37 / PYSEC-2026-1994
More information
Details
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
When streaming a compressed response, urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). The library must read compressed data from the network and decompress it until the requested chunk size is met. Any resulting decompressed data that exceeds the requested amount is held in an internal buffer for the next read operation.The decompression logic could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This can result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side, even if the application only requested a small chunk of data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier to stream large compressed responses or content from untrusted sources.
stream(),read(amt=256),read1(amt=256),read_chunked(amt=256),readinto(b)are examples ofurllib3.HTTPResponsemethod calls using the affected logic unless decoding is disabled explicitly.Remediation
Upgrade to at least urllib3 v2.6.0 in which the library avoids decompressing data that exceeds the requested amount.
If your environment contains a package facilitating the Brotli encoding, upgrade to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 too. These versions are enforced by the
urllib3[brotli]extra in the patched versions of urllib3.Credits
The issue was reported by @Cycloctane.
Supplemental information was provided by @stamparm during a security audit performed by 7ASecurity and facilitated by OSTIF.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
urllib3 allows an unbounded number of links in the decompression chain
CVE-2025-66418 / GHSA-gm62-xv2j-4w53 / PYSEC-2026-1998
More information
Details
Impact
urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g.,
Content-Encoding: gzip, zstd).However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.
Remediation
Upgrade to at least urllib3 v2.6.0 in which the library limits the number of links to 5.
If upgrading is not immediately possible, use
preload_content=Falseand ensure thatresp.headers["content-encoding"]contains a safe number of encodings before reading the response content.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
urllib3 allows an unbounded number of links in the decompression chain
CVE-2025-66418 / GHSA-gm62-xv2j-4w53 / PYSEC-2026-1998
More information
Details
Impact
urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g.,
Content-Encoding: gzip, zstd).However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.
Remediation
Upgrade to at least urllib3 v2.6.0 in which the library limits the number of links to 5.
If upgrading is not immediately possible, use
preload_content=Falseand ensure thatresp.headers["content-encoding"]contains a safe number of encodings before reading the response content.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
urllib3 streaming API improperly handles highly compressed data
CVE-2025-66471 / GHSA-2xpw-w6gg-jr37 / PYSEC-2026-1994
More information
Details
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
When streaming a compressed response, urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). The library must read compressed data from the network and decompress it until the requested chunk size is met. Any resulting decompressed data that exceeds the requested amount is held in an internal buffer for the next read operation.The decompression logic could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This can result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side, even if the application only requested a small chunk of data.
Affected usages
Applications and libraries using urllib3 version 2.5.0 and earlier to stream large compressed responses or content from untrusted sources.
stream(),read(amt=256),read1(amt=256),read_chunked(amt=256),readinto(b)are examples ofurllib3.HTTPResponsemethod calls using the affected logic unless decoding is disabled explicitly.Remediation
Upgrade to at least urllib3 v2.6.0 in which the library avoids decompressing data that exceeds the requested amount.
If your environment contains a package facilitating the Brotli encoding, upgrade to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 too. These versions are enforced by the
urllib3[brotli]extra in the patched versions of urllib3.Credits
The issue was reported by @Cycloctane.
Supplemental information was provided by @stamparm during a security audit performed by 7ASecurity and facilitated by OSTIF.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
CVE-2026-21441 / GHSA-38jv-5279-wg99 / PYSEC-2026-1996
More information
Details
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). When using the streaming API, the library decompresses only the necessary bytes, enabling partial content consumption.However, for HTTP redirect responses, the library would read the entire response body to drain the connection and decompress the content unnecessarily. This decompression occurred even before any read methods were called, and configured read limits did not restrict the amount of decompressed data. As a result, there was no safeguard against decompression bombs. A malicious server could exploit this to trigger excessive resource consumption on the client (high CPU usage and large memory allocations for decompressed data; CWE-409).
Affected usages
Applications and libraries using urllib3 version 2.6.2 and earlier to stream content from untrusted sources by setting
preload_content=Falsewhen they do not disable redirects.Remediation
Upgrade to at least urllib3 v2.6.3 in which the library does not decode content of redirect responses when
preload_content=False.If upgrading is not immediately possible, disable redirects by setting
redirect=Falsefor requests to untrusted source.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
CVE-2026-21441 / GHSA-38jv-5279-wg99 / PYSEC-2026-1996
More information
Details
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
urllib3 can perform decoding or decompression based on the HTTP
Content-Encodingheader (e.g.,gzip,deflate,br, orzstd). When using the streaming API, the library decompresses only the necessary bytes, enabling partial content consumption.However, for HTTP redirect responses, the library would read the entire response body to drain the connection and decompress the content unnecessarily. This decompression occurred even before any read methods were called, and configured read limits did not restrict the amount of decompressed data. As a result, there was no safeguard against decompression bombs. A malicious server could exploit this to trigger excessive resource consumption on the client (high CPU usage and large memory allocations for decompressed data; CWE-409).
Affected usages
Applications and libraries using urllib3 version 2.6.2 and earlier to stream content from untrusted sources by setting
preload_content=Falsewhen they do not disable redirects.Remediation
Upgrade to at least urllib3 v2.6.3 in which the library does not decode content of redirect responses when
preload_content=False.If upgrading is not immediately possible, disable redirects by setting
redirect=Falsefor requests to untrusted source.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
CVE-2026-44431 / GHSA-qccp-gfcp-xxvc / PYSEC-2026-141
More information
Details
urllib3 is an HTTP client library for Python. From 1.23 to before 2.7.0, cross-origin redirects followed from the low-level API via ProxyManager.connection_from_url().urlopen(..., assert_same_host=False) still forward these sensitive headers. This vulnerability is fixed in 2.7.0.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
urllib3: Sensitive headers forwarded across origins in proxied low-level redirects
CVE-2026-44431 / GHSA-qccp-gfcp-xxvc / PYSEC-2026-141
More information
Details
Impact
When following cross-origin redirects for requests made using urllib3’s high-level APIs, such as
urllib3.request(),PoolManager.request(), andProxyManager.request(), sensitive headers —Authorization,Cookie, andProxy-Authorization(defined inRetry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT) — are stripped by default, as expected.However, cross-origin redirects followed from the low-level API via
ProxyManager.connection_from_url().urlopen(..., assert_same_host=False)still forward these sensitive headers.Affected usage
Applications and libraries using urllib3 versions earlier than 2.7.0 may be affected if they allow cross-origin redirects while making requests through
HTTPConnection.urlopen()instances created viaProxyManager.connection_from_url().Remediation
Upgrade to urllib3 version 2.7.0 or later, in which sensitive headers are stripped from redirects followed by
HTTPConnection.If upgrading is not immediately possible, avoid using this low-level redirect flow for cross-origin redirects. If appropriate for your use case, switch to
ProxyManager.request().Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw / PYSEC-2026-4177
More information
Details
Impact
urllib3's streaming API 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, this API reads each chunk's size field by buffering until it sees
\nor EOF.A malicious HTTP server can return
Transfer-Encoding: chunkedand 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.To 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.
Affected usages
Applications 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() and stream() methods of the HTTPResponse object.
This also affects requests streaming API, which uses urllib3 under the hood.
Remediation
Upgrade 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() method.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
CVE-2026-97687 / GHSA-8988-9cw3-xx77 / PYSEC-2026-4175
More information
Details
Impact
urllib3 supports configuring TLS independently for an HTTPS proxy and the target server.
proxy_ssl_context,proxy_assert_hostname, andproxy_assert_fingerprintconfigure the TLS connection to the proxy.ssl_contextand the other target-specific TLS parameters configure the connection to the target server.In urllib3 versions 1.26.0 through 2.7.0, these configurations were not consistently separated. Depending on the proxy mode, urllib3 could:
proxy_ssl_contextand use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.In particular, configuring
cert_reqs="CERT_NONE"for a target server could overwrite theverify_modeof the SSL context configured for the HTTPS proxy. This modification occurred in place and persisted on the context object, potentially disabling proxy certificate verification for later connections that reused the same context.An attacker able to intercept the connection to an HTTPS proxy may be able to impersonate the proxy when the effective proxy TLS configuration disables certificate verification or otherwise accepts the attacker's certificate. This may occur, for example, when the target server's trust or identity policy is incorrectly applied to the proxy connection.
When HTTPS forwarding is enabled, an impersonated proxy can observe or modify forwarded requests and responses, potentially exposing credentials, authentication tokens, request bodies, response data, and other sensitive information.
A TLS client certificate intended for the target server may also be presented to the proxy or to an attacker impersonating it. This can disclose the client's identity and provide proof of possession of the corresponding private key. The private key itself is not transmitted during the TLS handshake.
In CONNECT tunneling mode, impersonating the HTTPS proxy does not by itself defeat the separate end-to-end TLS connection between the client and the target server.
Affected Usages
Code using urllib3 versions 1.26.0 through 2.7.0 may be affected in any of the following cases.
1. The target SSL context is used for an HTTPS forwarding proxy
HTTPS requests are forwarded through an HTTPS proxy with
use_forwarding_for_https=True, andproxy_ssl_contextis configured for the proxy.urllib3 may ignore
proxy_ssl_contextand use the target server'sssl_contextfor the proxy TLS handshake. The proxy may therefore be verified using the target server's trust and certificate policy instead of the policy explicitly configured for the proxy.2. The target verification policy overrides the proxy policy
An HTTPS proxy is configured with
proxy_ssl_context, while the target server uses a different certificate-verification policy.urllib3 may apply the target server's
cert_reqsvalue to the proxy SSL context. For example, settingcert_reqs="CERT_NONE"for the target server may also disable certificate verification for the HTTPS proxy, even whenproxy_ssl_contextwas configured to require verification.This issue can affect the TLS connection to an HTTPS proxy in both forwarding and CONNECT tunneling configurations.
3. A mutated proxy SSL context is reused
The same SSL context is reused as
proxy_ssl_contextacross multiple connections, and certificate verification is disabled for one target server.urllib3 may modify the proxy SSL context's
verify_modein place. Later connections that reuse the same context may therefore connect to the HTTPS proxy without certificate verification.4. Target-specific TLS identity or credentials are applied to the proxy
HTTPS requests are forwarded through an HTTPS proxy with
use_forwarding_for_https=True, and target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials are configured.urllib3 may apply these target-specific settings to the proxy TLS handshake. This may cause urllib3 to:
Code connecting through a plain HTTP proxy does not establish a TLS connection to the proxy and is not affected by this issue.
Remediation
Upgrade to urllib3 2.8.0 or later.
urllib3 2.8.0 independently applies the explicitly configured
proxy_ssl_contextand proxy-specific certificate assertions to the HTTPS proxy connection. Target-specific SNI, certificate assertions, and TLS client certificate parameters are no longer applied to the HTTPS proxy handshake.For backward compatibility, when an HTTPS proxy is used with
use_forwarding_for_https=Trueandproxy_ssl_contextis not provided, urllib3 2.8.0 continues to usessl_contextfor the TLS connection to the proxy. This configuration emits aFutureWarning. In urllib3 3.0, passingssl_contextwithuse_forwarding_for_https=Truefor an HTTPS proxy will raise an error. Applications should useproxy_ssl_contextto configure TLS for an HTTPS forwarding proxy.The fixes were implemented in commits b6447295fff7b38fdffc67e0df9712d60cef3cc3 and 07408cec79d1856d81bb42c74a904a24fdb9e465.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw / PYSEC-2026-4177
More information
Details
Impact
urllib3's streaming API 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, this API reads each chunk's size field by buffering until it sees
\nor EOF.A malicious HTTP server can return
Transfer-Encoding: chunkedand 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.To 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.
Affected usages
Applications 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() and stream() methods of the HTTPResponse object.
This also affects requests streaming API, which uses urllib3 under the hood.
Remediation
Upgrade 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() method.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:HReferences