fix(security/high/internal/test/integration/components/openai): update dependency urllib3 to v2.8.0 [security] #3156
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.80) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.80 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.080
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3156"
general
weight: 0.35
skl
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| urllib3 (changelog) |
==2.7.0→==2.8.0| !age | !confidence |---
---
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
CVE-2026-97687 / GHSA-8988-9cw3-xx77
<details>
<summary>More information</summary>
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:
1. Ignore
proxy_ssl_contextand use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.2. Override the HTTPS proxy's certificate-verification policy with the target server's certificate-verification policy.
3. Apply target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials to 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 the GitHub Advisory Database (CC-BY 4.0).
</details>
---
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw
<details>
<summary>More information</summary>
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 the GitHub Advisory Database (CC-BY 4.0).
</details>
---
urllib3: Chunked Deflate streaming can enter an infinite loop
CVE-2026-97688 / GHSA-gh4c-6fx4-qh6g
<details>
<summary>More information</summary>
Details
##### Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once.
urllib3 can decompress response bodies according to the HTTP
Content-Encodingheader. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk.However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network.
A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required.
##### Affected usages
Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met:
1. Compressed responses from an untrusted source are streamed using
HTTPResponse.stream(amt=N)orHTTPResponse.read_chunked(amt=N)with a positive, finite chunk size.2. Content decoding is enabled.
3. The response uses both
Transfer-Encoding: chunkedandContent-Encoding: deflate.4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream.
HTTPResponse.stream()uses a finite chunk size by default and is therefore affected when the other conditions are met.##### Remediation
Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer reports trailing bytes as data that can produce more decoded output.
If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting
decode_content=False, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
</details>
---
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
CVE-2026-97687 / GHSA-8988-9cw3-xx77 / PYSEC-2026-4175
<details>
<summary>More information</summary>
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:
1. Ignore
proxy_ssl_contextand use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.2. Override the HTTPS proxy's certificate-verification policy with the target server's certificate-verification policy.
3. Apply target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials to 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).
</details>
---
urllib3: Chunked Deflate streaming can enter an infinite loop
CVE-2026-97688 / GHSA-gh4c-6fx4-qh6g / PYSEC-2026-4176
<details>
<summary>More information</summary>
Details
##### Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once.
urllib3 can decompress response bodies according to the HTTP
Content-Encodingheader. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk.However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network.
A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required.
##### Affected usages
Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met:
1. Compressed responses from an untrusted source are streamed using
HTTPResponse.stream(amt=N)orHTTPResponse.read_chunked(amt=N)with a positive, finite chunk size.2. Content decoding is enabled.
3. The response uses both
Transfer-Encoding: chunkedandContent-Encoding: deflate.4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream.
HTTPResponse.stream()uses a finite chunk size by default and is therefore affected when the other conditions are met.##### Remediation
Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer reports trailing bytes as data that can produce more decoded output.
If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting
decode_content=False, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
</details>
---
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw / PYSEC-2026-4177
<details>
<summary>More information</summary>
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).
</details>
---
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
CVE-2026-97687 / GHSA-8988-9cw3-xx77 / PYSEC-2026-4175
<details>
<summary>More information</summary>
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:
1. Ignore
proxy_ssl_contextand use the target server's SSL context for the TLS connection to an HTTPS forwarding proxy.2. Override the HTTPS proxy's certificate-verification policy with the target server's certificate-verification policy.
3. Apply target-specific SNI, hostname assertions, certificate fingerprint assertions, or TLS client credentials to 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 PyPI Advisory Database (CC-BY 4.0).
</details>
---
urllib3: Chunked Deflate streaming can enter an infinite loop
CVE-2026-97688 / GHSA-gh4c-6fx4-qh6g / PYSEC-2026-4176
<details>
<summary>More information</summary>
Details
##### Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once.
urllib3 can decompress response bodies according to the HTTP
Content-Encodingheader. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk.However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network.
A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required.
##### Affected usages
Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met:
1. Compressed responses from an untrusted source are streamed using
HTTPResponse.stream(amt=N)orHTTPResponse.read_chunked(amt=N)with a positive, finite chunk size.2. Content decoding is enabled.
3. The response uses both
Transfer-Encoding: chunkedandContent-Encoding: deflate.4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream.
HTTPResponse.stream()uses a finite chunk size by default and is therefore affected when the other conditions are met.##### Remediation
Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer reports trailing bytes as data that can produce more decoded output.
If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting
decode_content=False, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
</details>
---
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
CVE-2026-97689 / GHSA-vxq7-64xx-v4gw / PYSEC-2026-4177
<details>
<summary>More information</summary>
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 PyPI Advisory Database (CC-BY 4.0).
</details>
---
Release Notes
<details>
<summary>urllib3/urllib3 (urllib3)</summary>
v2.8.0Compare Source
\==================
Security
Fixed the following security issues:
(High severity,
GHSA-8988-9cw3-xx77 <https://github.com/urllib3/urllib3/security/advisories/GHSA-8988-9cw3-xx77>\_\_)HTTPResponse.stream()andread_chunked()could buffer a chunk-sizeline of unbounded length in memory. (High severity,
GHSA-vxq7-64xx-v4gw <https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw>\_\_)GHSA-gh4c-6fx4-qh6g <https://github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g>\_\_).. caution::
Deprecations & Removals
Retryoptionallowed_methodsto retry any verb.(
#​5044 <https://github.com/urllib3/urllib3/issues/5044>\_\_)Features
Url.auth_decodedandUrl.auth_decoded_joinedconvenienceproperties to the result of
parse_url().(
#​4945 <https://github.com/urllib3/urllib3/issues/4945>\_\_)basic_auth_encodingandproxy_basic_auth_encodingparameters tourllib3.util.make_headers().(
#​5092 <https://github.com/urllib3/urllib3/issues/5092>\_\_)Bugfixes
(
obs-fold) with spaces in accordance with RFC 9112, preventing raw CRLFsequences from appearing in header values such as
Set-Cookie.(
#​1362 <https://github.com/urllib3/urllib3/issues/1362>\_\_)proxy_ssl_contextwithProxyManagerwhenuse_forwarding_for_https=True. Passingssl_contextinstead ofproxy_ssl_contextfor HTTPS proxies in this configuration now emits aFutureWarningand will raise an error in v3.0.(
#​2577 <https://github.com/urllib3/urllib3/issues/2577>\_\_)ConnectionPool.poolinitialization.LifoQueueis now resolved from thequeuemodule after theConnectionPoolis instantiated instead of using the default cachedQueueClsclass property. This is done because sometimes thequeue.LifoQueueis monkey-patched late in the program, such as by gevent.(
#​3289 <https://github.com/urllib3/urllib3/issues/3289>\_\_)UnrewindableBodyErrorinstead ofValueErrorwhen retrying arequest whose body had
tell()but notseek().(
#​3779 <https://github.com/urllib3/urllib3/issues/3779>\_\_)the proxy server.
(
#​3785 <https://github.com/urllib3/urllib3/issues/3785>\_\_)HTTPResponse.drain_conn()to discard unread response data in 64 KiBchunks (same as the default
amtwhen doingHTTPResponse.stream(...)).(
#​5019 <https://github.com/urllib3/urllib3/issues/5019>\_\_)is_ipaddress()to detect non-standard IPv4 forms accepted bysocket.connect, such as hex (0x7f000001), octal (0177.0.0.1), anddecimal integers (
2130706433), ensuring SSL certificate verification usesthe correct mode for these addresses.
(
#​5029 <https://github.com/urllib3/urllib3/issues/5029>\_\_)HTTPConnectionPool.urlopenraising a misleadingFullPoolErrorinstead of
ValueErrorwhen called with an invalidtimeoutargument ona pool created with
block=True.(
#​5059 <https://github.com/urllib3/urllib3/issues/5059>\_\_):0values instead ofsubstituting the default ports 80 or 443 in URL parsing, pool selection,
proxy configuration,
connection_from_url(), and HTTP/2 request authority.(
#​5071 <https://github.com/urllib3/urllib3/issues/5071>,#​5101 <https://github.com/urllib3/urllib3/issues/5101>)PoolManagerpassed theassert_hostnameandassert_fingerprintparameters to HTTP connection pools.(
#​5077 <https://github.com/urllib3/urllib3/issues/5077>\_\_)HTTPConnectionPool.urlopen()and HTTP proxy forwarding to strip URLfragments from absolute request targets before sending requests.
(
#​5079 <https://github.com/urllib3/urllib3/issues/5079>\_\_)issues when handling invalid characters in the proxy host and HTTP headers.
This change affects users of Python 3.10, Python 3.11, and Python 3.12 when
the standard library does not contain the fix; those on newer Python versions
should upgrade to 3.13.14+ or 3.14.5+ to get the same security fixes.
(
#​5091 <https://github.com/urllib3/urllib3/issues/5091>\_\_)HTTPSConnection.connect()overridingProxyConfig.ssl_context'scertificate policy and proxy identity checks with the target connection's TLS
settings when forwarding through an HTTPS proxy.
HTTPSConnectionno longer applies target SNI, assertions, or clientcredentials to forwarding proxy handshakes and continues to use its
ssl_contextas a fallback when an HTTPS proxy forwards an HTTP target.(
#​5093 <https://github.com/urllib3/urllib3/issues/5093>\_\_)invalid host input such as raw spaces and control characters, malformed
percent-encodings, and percent-encoded control characters in HTTP(S) hosts
and IPv6 zone identifiers, including proxy CONNECT tunnel targets. Host
normalization now also follows RFC 3986 normalization rules for
percent-encoded octets by decoding percent-encoded unreserved characters and
uppercasing the hexadecimal digits of retained percent-encoded octets.
(
#​5095 <https://github.com/urllib3/urllib3/issues/5095>\_\_)AttributeErroron Python built with OpenSSL 4+, wheressl.PROTOCOL_TLSv1no longer exists.(
#​5097 <https://github.com/urllib3/urllib3/issues/5097>\_\_)urllib3.contrib.pyopensslto use cryptography APIs when reading acertificate subject and loading encrypted private keys, avoiding
DeprecationWarningraised by pyOpenSSL 26.3.0+.(
#​5103 <https://github.com/urllib3/urllib3/issues/5103>\_\_)bodies.
(
#​5161 <https://github.com/urllib3/urllib3/issues/5161>\_\_)assert_fingerprint()to raiseSSLErrorinstead ofbinascii.Errorwhen a fingerprint has a supported length but containsnon-hexadecimal characters.
(
#​5211 <https://github.com/urllib3/urllib3/issues/5211>\_\_)Misc
testdependency group containing the minimum dependencies neededto run the test suite, intended for downstream packagers. The
dev-baseand
mypygroups now include this new group viainclude-group,removing duplication.
(
#​3594 <https://github.com/urllib3/urllib3/issues/3594>\_\_)(
#​5094 <https://github.com/urllib3/urllib3/issues/5094>\_\_)(
#​5166 <https://github.com/urllib3/urllib3/issues/5166>\_\_)(
#​5209 <https://github.com/urllib3/urllib3/issues/5209>\_\_)(
#​5232 <https://github.com/urllib3/urllib3/issues/5232>,#​5234 <https://github.com/urllib3/urllib3/issues/5234>,#​5239 <https://github.com/urllib3/urllib3/issues/5239>\_\_)</details>
---
Configuration
📅 Schedule: (UTC)
- At any time (no schedule defined)
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTUuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjExNS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2Utc2VjdXJpdHktdXBkYXRlIiwic2V2ZXJpdHk6SElHSCIsInVwZGF0ZS1taW5vciJdfQ==-->