Skip to content

Update dependency urllib3 to v2.7.0 [SECURITY]#1913

Merged
renovate[bot] merged 1 commit into
masterfrom
renovate/pypi-urllib3-vulnerability
May 22, 2026
Merged

Update dependency urllib3 to v2.7.0 [SECURITY]#1913
renovate[bot] merged 1 commit into
masterfrom
renovate/pypi-urllib3-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 11, 2026

This PR contains the following updates:

Package Update Change OpenSSF
urllib3 (changelog) minor ==2.6.3==2.7.0 OpenSSF Scorecard

urllib3: Decompression-bomb safeguards bypassed in parts of the streaming API

CVE-2026-44432 / GHSA-mf9v-mfxr-j63j

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 decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd). When using the streaming API since version 2.6.0, the library decompresses only the necessary bytes, enabling partial content consumption.

However, urllib3 before version 2.7.0 could still decompress the whole response instead of the requested portion in two cases:

  1. During the second HTTPResponse.read(amt=N) call when the response was decompressed using the official Brotli library.
  2. When HTTPResponse.drain_conn() was called after the response had been read and decompressed partially (compression algorithm did not matter here).

These issues could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This could result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side.

Affected usages

Applications and libraries using urllib3 versions earlier than 2.7.0 may be affected when streaming compressed responses from untrusted sources in either of these cases, unless decompression is explicitly disabled:

  1. A response encoded with br is read incrementally with at least two HTTPResponse.read(amt=N) or HTTPResponse.stream(amt=N) calls while using the official Brotli library.
  2. HTTPResponse.drain_conn() is called after response decompression has already started.
Remediation

Upgrade to at least urllib3 version 2.7.0 in which the library:

  1. Is more efficient for reads with Brotli.
  2. Always skips decompression for HTTPResponse.drain_conn().

If upgrading is not immediately possible, the following workarounds may reduce exposure in specific cases:

  1. For the Brotli-specific issue only, switch from brotli to brotlicffi until you can upgrade urllib3; the official Brotli package is affected because of https://github.com/google/brotli/issues/1396.
  2. If your code explicitly calls HTTPResponse.drain_conn(), call HTTPResponse.close() instead when connection reuse is not important.
Credits

The Brotli-specific issue was reported by @​kimkou2024.
HTTPResponse.drain_conn() inefficiency was reported by @​Cycloctane.

Severity

  • CVSS Score: 8.9 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


urllib3: Sensitive headers forwarded across origins in proxied low-level redirects

CVE-2026-44431 / GHSA-qccp-gfcp-xxvc

More information

Details

Impact

When following cross-origin redirects for requests made using urllib3’s high-level APIs, such as urllib3.request(), PoolManager.request(), and ProxyManager.request(), sensitive headers — Authorization, Cookie, and Proxy-Authorization (defined in Retry.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 via ProxyManager.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 Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


urllib3: Decompression-bomb safeguards bypassed in parts of the streaming API

CVE-2026-44432 / GHSA-mf9v-mfxr-j63j / PYSEC-2026-142

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 decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd). When using the streaming API since version 2.6.0, the library decompresses only the necessary bytes, enabling partial content consumption.

However, urllib3 before version 2.7.0 could still decompress the whole response instead of the requested portion in two cases:

  1. During the second HTTPResponse.read(amt=N) call when the response was decompressed using the official Brotli library.
  2. When HTTPResponse.drain_conn() was called after the response had been read and decompressed partially (compression algorithm did not matter here).

These issues could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This could result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side.

Affected usages

Applications and libraries using urllib3 versions earlier than 2.7.0 may be affected when streaming compressed responses from untrusted sources in either of these cases, unless decompression is explicitly disabled:

  1. A response encoded with br is read incrementally with at least two HTTPResponse.read(amt=N) or HTTPResponse.stream(amt=N) calls while using the official Brotli library.
  2. HTTPResponse.drain_conn() is called after response decompression has already started.
Remediation

Upgrade to at least urllib3 version 2.7.0 in which the library:

  1. Is more efficient for reads with Brotli.
  2. Always skips decompression for HTTPResponse.drain_conn().

If upgrading is not immediately possible, the following workarounds may reduce exposure in specific cases:

  1. For the Brotli-specific issue only, switch from brotli to brotlicffi until you can upgrade urllib3; the official Brotli package is affected because of https://github.com/google/brotli/issues/1396.
  2. If your code explicitly calls HTTPResponse.drain_conn(), call HTTPResponse.close() instead when connection reuse is not important.
Credits

The Brotli-specific issue was reported by @​kimkou2024.
HTTPResponse.drain_conn() inefficiency was reported by @​Cycloctane.

Severity

  • CVSS Score: 8.9 / 10 (High)
  • Vector String: 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

References

This data is provided by OSV and the GitHub 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(), and ProxyManager.request(), sensitive headers — Authorization, Cookie, and Proxy-Authorization (defined in Retry.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 via ProxyManager.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 Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub 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 Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).


CVE-2026-44432 / GHSA-mf9v-mfxr-j63j / PYSEC-2026-142

More information

Details

urllib3 is an HTTP client library for Python. From 2.6.0 to before 2.7.0, urllib3 could decompress the whole response instead of the requested portion (1) during the second HTTPResponse.read(amt=N) call when the response was decompressed using the official Brotli library or (2) when HTTPResponse.drain_conn() was called after the response had been read and decompressed partially (compression algorithm did not matter here). These issues could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This could result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data) on the client side. This vulnerability is fixed in 2.7.0.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).


Release Notes

urllib3/urllib3 (urllib3)

v2.7.0

Compare Source

=======================

Security

Addressed high-severity security issues.
Impact was limited to specific use cases detailed in the accompanying
advisories; overall user exposure was estimated to be marginal.

  • Decompression-bomb safeguards of the streaming API were bypassed:

    1. When HTTPResponse.drain_conn() was called after the response had been
      read and decompressed partially.
    2. During the second HTTPResponse.read(amt=N) or
      HTTPResponse.stream(amt=N) call when the response was decompressed
      using the official Brotli <https://pypi.org/project/brotli/>__ library.

    See GHSA-mf9v-mfxr-j63j <https://github.com/urllib3/urllib3/security/advisories/GHSA-mf9v-mfxr-j63j>__
    for details.

  • HTTP pools created using ProxyManager.connection_from_url did not strip
    sensitive headers specified in Retry.remove_headers_on_redirect when
    redirecting to a different host.
    (GHSA-qccp-gfcp-xxvc <https://github.com/urllib3/urllib3/security/advisories/GHSA-qccp-gfcp-xxvc>__)

Deprecations and Removals

  • Used FutureWarning instead of DeprecationWarning for better
    visibility of existing deprecation notices. Rescheduled the removal of
    deprecated features to version 3.0.
    (#&#8203;3763 <https://github.com/urllib3/urllib3/issues/3763>__)
  • Removed support for end-of-life Python 3.9.
    (#&#8203;3720 <https://github.com/urllib3/urllib3/issues/3720>__)
  • Removed support for end-of-life PyPy3.10.
    (#&#8203;4979 <https://github.com/urllib3/urllib3/issues/4979>__)
  • Bumped the minimum supported pyOpenSSL version to 19.0.0.
    (#&#8203;3777 <https://github.com/urllib3/urllib3/issues/3777>__)

Bugfixes

  • Fixed a bug where HTTPResponse.read(amt=None) was ignoring decompressed
    data buffered from previous partial reads.
    (#&#8203;3636 <https://github.com/urllib3/urllib3/issues/3636>__)
  • Fixed a bug where HTTPResponse.read() could cache only part of the
    response after a partial read when cache_content=True.
    (#&#8203;4967 <https://github.com/urllib3/urllib3/issues/4967>__)
  • Fixed HTTPResponse.stream() and HTTPResponse.read_chunked() to handle
    amt=0.
    (#&#8203;3793 <https://github.com/urllib3/urllib3/issues/3793>__)
  • Updated _TYPE_BODY type alias to include missing Iterable[str],
    matching the documented and runtime behavior of chunked request bodies.
    (#&#8203;3798 <https://github.com/urllib3/urllib3/issues/3798>__)
  • Fixed LocationParseError when paths resembling schemeless URIs were
    passed to HTTPConnectionPool.urlopen().
    (#&#8203;3352 <https://github.com/urllib3/urllib3/issues/3352>__)
  • Fixed BaseHTTPResponse.readinto() type annotation to accept
    memoryview in addition to bytearray, matching the
    io.RawIOBase.readinto contract and enabling use with
    io.BufferedReader without type errors.
    (#&#8203;3764 <https://github.com/urllib3/urllib3/issues/3764>__)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 11, 2026 17:18 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from ee206ec to 34eaa32 Compare May 12, 2026 02:28
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 12, 2026 02:29 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from 34eaa32 to 6223bfb Compare May 14, 2026 08:48
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 14, 2026 08:49 Inactive
@renovate renovate Bot changed the title Update dependency urllib3 to v2.7.0 [SECURITY] Update dependency urllib3 to v2.7.0 [SECURITY] - autoclosed May 15, 2026
@renovate renovate Bot closed this May 15, 2026
@renovate renovate Bot deleted the renovate/pypi-urllib3-vulnerability branch May 15, 2026 16:17
@renovate renovate Bot changed the title Update dependency urllib3 to v2.7.0 [SECURITY] - autoclosed Update dependency urllib3 to v2.7.0 [SECURITY] May 18, 2026
@renovate renovate Bot reopened this May 18, 2026
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch 2 times, most recently from 6223bfb to 07e1047 Compare May 18, 2026 10:17
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 18, 2026 10:18 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from 07e1047 to 38fddbf Compare May 19, 2026 18:07
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 19, 2026 18:07 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from 38fddbf to 56279fa Compare May 21, 2026 08:20
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 21, 2026 08:20 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from 56279fa to d9e0dee Compare May 21, 2026 11:32
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 21, 2026 11:33 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from d9e0dee to c8556d6 Compare May 22, 2026 09:21
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 22, 2026 09:22 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from c8556d6 to 58f8b73 Compare May 22, 2026 10:18
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 22, 2026 10:19 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from 58f8b73 to c7f5dcb Compare May 22, 2026 11:18
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 22, 2026 11:19 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from c7f5dcb to fb9c344 Compare May 22, 2026 12:18
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 22, 2026 12:19 Inactive
@renovate renovate Bot force-pushed the renovate/pypi-urllib3-vulnerability branch from fb9c344 to 2262fca Compare May 22, 2026 13:18
@renovate renovate Bot temporarily deployed to Vespa Cloud CD May 22, 2026 13:19 Inactive
@renovate renovate Bot merged commit 7c7cc55 into master May 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants