Skip to content

chore(deps): update dependency requests to v2.33.0 [security]#7

Open
renovate-sh-app[bot] wants to merge 1 commit intomainfrom
renovate/pypi-requests-vulnerability
Open

chore(deps): update dependency requests to v2.33.0 [security]#7
renovate-sh-app[bot] wants to merge 1 commit intomainfrom
renovate/pypi-requests-vulnerability

Conversation

@renovate-sh-app
Copy link
Copy Markdown

@renovate-sh-app renovate-sh-app bot commented Nov 28, 2025

This PR contains the following updates:

Package Change Age Confidence
requests (changelog) ==2.25.0==2.33.0 age confidence

GitHub Vulnerability Alerts

CVE-2023-32681

Impact

Since Requests v2.3.0, Requests has been vulnerable to potentially leaking Proxy-Authorization headers to destination servers, specifically during redirects to an HTTPS origin. This is a product of how rebuild_proxies is used to recompute and reattach the Proxy-Authorization header to requests when redirected. Note this behavior has only been observed to affect proxied requests when credentials are supplied in the URL user information component (e.g. https://username:password@proxy:8080).

Current vulnerable behavior(s):

  1. HTTP → HTTPS: leak
  2. HTTPS → HTTP: no leak
  3. HTTPS → HTTPS: leak
  4. HTTP → HTTP: no leak

For HTTP connections sent through the proxy, the proxy will identify the header in the request itself and remove it prior to forwarding to the destination server. However when sent over HTTPS, the Proxy-Authorization header must be sent in the CONNECT request as the proxy has no visibility into further tunneled requests. This results in Requests forwarding the header to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate those credentials.

The reason this currently works for HTTPS connections in Requests is the Proxy-Authorization header is also handled by urllib3 with our usage of the ProxyManager in adapters.py with proxy_manager_for. This will compute the required proxy headers in proxy_headers and pass them to the Proxy Manager, avoiding attaching them directly to the Request object. This will be our preferred option going forward for default usage.

Patches

Starting in Requests v2.31.0, Requests will no longer attach this header to redirects with an HTTPS destination. This should have no negative impacts on the default behavior of the library as the proxy credentials are already properly being handled by urllib3's ProxyManager.

For users with custom adapters, this may be potentially breaking if you were already working around this behavior. The previous functionality of rebuild_proxies doesn't make sense in any case, so we would encourage any users impacted to migrate any handling of Proxy-Authorization directly into their custom adapter.

Workarounds

For users who are not able to update Requests immediately, there is one potential workaround.

You may disable redirects by setting allow_redirects to False on all calls through Requests top-level APIs. Note that if you're currently relying on redirect behaviors, you will need to capture the 3xx response codes and ensure a new request is made to the redirect destination.

import requests
r = requests.get('http://github.com/', allow_redirects=False)

Credits

This vulnerability was discovered and disclosed by the following individuals.

Dennis Brinkrolf, Haxolot (https://haxolot.com/)
Tobias Funke, (tobiasfunke93@​gmail.com)

Severity
  • CVSS Score: 6.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N

CVE-2024-35195

When using a requests.Session, if the first request to a given origin is made with verify=False, TLS certificate verification may remain disabled for all subsequent requests to that origin, even if verify=True is explicitly specified later.

This occurs because the underlying connection is reused from the session's connection pool, causing the initial TLS verification setting to persist for the lifetime of the pooled connection. As a result, applications may unintentionally send requests without certificate verification, leading to potential man-in-the-middle attacks and compromised confidentiality or integrity.

This behavior affects versions of requests prior to 2.32.0.

Severity
  • CVSS Score: 5.6 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N

CVE-2024-47081

Impact

Due to a URL parsing issue, Requests releases prior to 2.32.4 may leak .netrc credentials to third parties for specific maliciously-crafted URLs.

Workarounds

For older versions of Requests, use of the .netrc file can be disabled with trust_env=False on your Requests Session (docs).

References

https://github.com/psf/requests/pull/6965
https://seclists.org/fulldisclosure/2025/Jun/2

Severity
  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

CVE-2026-25645

Impact

The requests.utils.extract_zipped_paths() utility function uses a predictable filename when extracting files from zip archives into the system temporary directory. If the target file already exists, it is reused without validation. A local attacker with write access to the temp directory could pre-create a malicious file that would be loaded in place of the legitimate one.

Affected usages

Standard usage of the Requests library is not affected by this vulnerability. Only applications that call extract_zipped_paths() directly are impacted.

Remediation

Upgrade to at least Requests 2.33.0, where the library now extracts files to a non-deterministic location.

If developers are unable to upgrade, they can set TMPDIR in their environment to a directory with restricted write access.

Severity
  • CVSS Score: 4.4 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N

Unintended leak of Proxy-Authorization header in requests

CVE-2023-32681 / GHSA-j8r2-6x86-q33q / PYSEC-2023-74

More information

Details

Impact

Since Requests v2.3.0, Requests has been vulnerable to potentially leaking Proxy-Authorization headers to destination servers, specifically during redirects to an HTTPS origin. This is a product of how rebuild_proxies is used to recompute and reattach the Proxy-Authorization header to requests when redirected. Note this behavior has only been observed to affect proxied requests when credentials are supplied in the URL user information component (e.g. https://username:password@proxy:8080).

Current vulnerable behavior(s):

  1. HTTP → HTTPS: leak
  2. HTTPS → HTTP: no leak
  3. HTTPS → HTTPS: leak
  4. HTTP → HTTP: no leak

For HTTP connections sent through the proxy, the proxy will identify the header in the request itself and remove it prior to forwarding to the destination server. However when sent over HTTPS, the Proxy-Authorization header must be sent in the CONNECT request as the proxy has no visibility into further tunneled requests. This results in Requests forwarding the header to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate those credentials.

The reason this currently works for HTTPS connections in Requests is the Proxy-Authorization header is also handled by urllib3 with our usage of the ProxyManager in adapters.py with proxy_manager_for. This will compute the required proxy headers in proxy_headers and pass them to the Proxy Manager, avoiding attaching them directly to the Request object. This will be our preferred option going forward for default usage.

Patches

Starting in Requests v2.31.0, Requests will no longer attach this header to redirects with an HTTPS destination. This should have no negative impacts on the default behavior of the library as the proxy credentials are already properly being handled by urllib3's ProxyManager.

For users with custom adapters, this may be potentially breaking if you were already working around this behavior. The previous functionality of rebuild_proxies doesn't make sense in any case, so we would encourage any users impacted to migrate any handling of Proxy-Authorization directly into their custom adapter.

Workarounds

For users who are not able to update Requests immediately, there is one potential workaround.

You may disable redirects by setting allow_redirects to False on all calls through Requests top-level APIs. Note that if you're currently relying on redirect behaviors, you will need to capture the 3xx response codes and ensure a new request is made to the redirect destination.

import requests
r = requests.get('http://github.com/', allow_redirects=False)
Credits

This vulnerability was discovered and disclosed by the following individuals.

Dennis Brinkrolf, Haxolot (https://haxolot.com/)
Tobias Funke, (tobiasfunke93@​gmail.com)

Severity

  • CVSS Score: 6.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N

References

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


CVE-2023-32681 / GHSA-j8r2-6x86-q33q / PYSEC-2023-74

More information

Details

Requests is a HTTP library. Since Requests 2.3.0, Requests has been leaking Proxy-Authorization headers to destination servers when redirected to an HTTPS endpoint. This is a product of how we use rebuild_proxies to reattach the Proxy-Authorization header to requests. For HTTP connections sent through the tunnel, the proxy will identify the header in the request itself and remove it prior to forwarding to the destination server. However when sent over HTTPS, the Proxy-Authorization header must be sent in the CONNECT request as the proxy has no visibility into the tunneled request. This results in Requests forwarding proxy credentials to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate sensitive information. This issue has been patched in version 2.31.0.

Severity

Unknown

References

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


Requests Session object does not verify requests after making first request with verify=False

CVE-2024-35195 / GHSA-9wx4-h78v-vm56

More information

Details

When using a requests.Session, if the first request to a given origin is made with verify=False, TLS certificate verification may remain disabled for all subsequent requests to that origin, even if verify=True is explicitly specified later.

This occurs because the underlying connection is reused from the session's connection pool, causing the initial TLS verification setting to persist for the lifetime of the pooled connection. As a result, applications may unintentionally send requests without certificate verification, leading to potential man-in-the-middle attacks and compromised confidentiality or integrity.

This behavior affects versions of requests prior to 2.32.0.

Severity

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

References

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


Requests vulnerable to .netrc credentials leak via malicious URLs

CVE-2024-47081 / GHSA-9hjg-9r4m-mvj7

More information

Details

Impact

Due to a URL parsing issue, Requests releases prior to 2.32.4 may leak .netrc credentials to third parties for specific maliciously-crafted URLs.

Workarounds

For older versions of Requests, use of the .netrc file can be disabled with trust_env=False on your Requests Session (docs).

References

https://github.com/psf/requests/pull/6965
https://seclists.org/fulldisclosure/2025/Jun/2

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

References

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


Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function

CVE-2026-25645 / GHSA-gc5v-m9x4-r6x2

More information

Details

Impact

The requests.utils.extract_zipped_paths() utility function uses a predictable filename when extracting files from zip archives into the system temporary directory. If the target file already exists, it is reused without validation. A local attacker with write access to the temp directory could pre-create a malicious file that would be loaded in place of the legitimate one.

Affected usages

Standard usage of the Requests library is not affected by this vulnerability. Only applications that call extract_zipped_paths() directly are impacted.

Remediation

Upgrade to at least Requests 2.33.0, where the library now extracts files to a non-deterministic location.

If developers are unable to upgrade, they can set TMPDIR in their environment to a directory with restricted write access.

Severity

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

References

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


Release Notes

psf/requests (requests)

v2.33.0

Compare Source

v2.32.5

Compare Source

v2.32.4

Compare Source

v2.32.3

Compare Source

v2.32.2

Compare Source

v2.32.1

Compare Source

v2.32.0

Compare Source

v2.31.0

Compare Source

v2.30.0

Compare Source

v2.29.0

Compare Source

v2.28.2

Compare Source

v2.28.1

Compare Source

v2.28.0

Compare Source

v2.27.1

Compare Source

Bugfixes

  • Fixed parsing issue that resulted in the auth component being
    dropped from proxy URLs. (#​6028)

v2.27.0

Compare Source

Improvements

  • Officially added support for Python 3.10. (#​5928)

  • Added a requests.exceptions.JSONDecodeError to unify JSON exceptions between
    Python 2 and 3. This gets raised in the response.json() method, and is
    backwards compatible as it inherits from previously thrown exceptions.
    Can be caught from requests.exceptions.RequestException as well. (#​5856)

  • Improved error text for misnamed InvalidSchema and MissingSchema
    exceptions. This is a temporary fix until exceptions can be renamed
    (Schema->Scheme). (#​6017)

  • Improved proxy parsing for proxy URLs missing a scheme. This will address
    recent changes to urlparse in Python 3.9+. (#​5917)

Bugfixes

  • Fixed defect in extract_zipped_paths which could result in an infinite loop
    for some paths. (#​5851)

  • Fixed handling for AttributeError when calculating length of files obtained
    by Tarfile.extractfile(). (#​5239)

  • Fixed urllib3 exception leak, wrapping urllib3.exceptions.InvalidHeader with
    requests.exceptions.InvalidHeader. (#​5914)

  • Fixed bug where two Host headers were sent for chunked requests. (#​5391)

  • Fixed regression in Requests 2.26.0 where Proxy-Authorization was
    incorrectly stripped from all requests sent with Session.send. (#​5924)

  • Fixed performance regression in 2.26.0 for hosts with a large number of
    proxies available in the environment. (#​5924)

  • Fixed idna exception leak, wrapping UnicodeError with
    requests.exceptions.InvalidURL for URLs with a leading dot (.) in the
    domain. (#​5414)

Deprecations

  • Requests support for Python 2.7 and 3.6 will be ending in 2022. While we
    don't have exact dates, Requests 2.27.x is likely to be the last release
    series providing support.

v2.26.0

Compare Source

Improvements

  • Requests now supports Brotli compression, if either the brotli or
    brotlicffi package is installed. (#​5783)

  • Session.send now correctly resolves proxy configurations from both
    the Session and Request. Behavior now matches Session.request. (#​5681)

Bugfixes

  • Fixed a race condition in zip extraction when using Requests in parallel
    from zip archive. (#​5707)

Dependencies

  • Instead of chardet, use the MIT-licensed charset_normalizer for Python3
    to remove license ambiguity for projects bundling requests. If chardet
    is already installed on your machine it will be used instead of charset_normalizer
    to keep backwards compatibility. (#​5797)

    You can also install chardet while installing requests by
    specifying [use_chardet_on_py3] extra as follows:

    pip install "requests[use_chardet_on_py3]"

    Python2 still depends upon the chardet module.

  • Requests now supports idna 3.x on Python 3. idna 2.x will continue to
    be used on Python 2 installations. (#​5711)

Deprecations

  • The requests[security] extra has been converted to a no-op install.
    PyOpenSSL is no longer the recommended secure option for Requests. (#​5867)

  • Requests has officially dropped support for Python 3.5. (#​5867)

v2.25.1

Compare Source

Bugfixes

  • Requests now treats application/json as utf8 by default. Resolving
    inconsistencies between r.text and r.json output. (#​5673)

Dependencies

  • Requests now supports chardet v4.x.

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

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.

@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-actions

This comment has been minimized.

| datasource | package  | from   | to     |
| ---------- | -------- | ------ | ------ |
| pypi       | requests | 2.25.0 | 2.33.0 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
@renovate-sh-app renovate-sh-app bot changed the title chore(deps): update dependency requests to v2.32.4 [security] chore(deps): update dependency requests to v2.33.0 [security] Mar 25, 2026
@renovate-sh-app renovate-sh-app bot force-pushed the renovate/pypi-requests-vulnerability branch from 56508ce to 1fc2012 Compare March 25, 2026 22:01
@github-actions
Copy link
Copy Markdown

😢 zizmor failed with exit code 14.

Expand for full output
�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m./.github/workflows/push.yaml:18:15
   �[1m�[94m|�[0m
�[1m�[94m18�[0m �[1m�[94m|�[0m         uses: docker/setup-buildx-action@v1
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m./.github/workflows/push.yaml:21:15
   �[1m�[94m|�[0m
�[1m�[94m21�[0m �[1m�[94m|�[0m         uses: docker/login-action@v1
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m./.github/workflows/push.yaml:28:15
   �[1m�[94m|�[0m
�[1m�[94m28�[0m �[1m�[94m|�[0m         uses: docker/build-push-action@v2
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[32m7�[39m findings (�[1m�[93m2�[39m ignored, �[93m2�[39m suppressed�[0m): �[35m0�[39m informational, �[36m0�[39m low, �[33m0�[39m medium, �[31m3�[39m high

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant