← Back to issue list

chore(deps): update dependency requests to v2.31.0 [security] - abandoned

View original Github issue

Metadata

Project
charmcraft
Number
#1111
Type
pull request
State
closed
Author
renovate[bot]
Labels
—
Created
Updated
Closed

Current evaluation

Renovate's requests 2.28.2 -> 2.31.0 security PR was closed empty (0 files) after autoclosing was skipped due to a modified branch; the identical CVE-2023-32681 upgrade landed via merged Dependabot PR #1110 (10d6d55a).

Resolution: closed superseded

Reason: The PR never carried any file changes (diff +0/-0) and Renovate posted 'Autoclosing Skipped ... branch being already modified. Please close/delete it manually' on 2023-05-24. The same upgrade, requests 2.28.2 to 2.31.0 for CVE-2023-32681, was already merged in canonical/charmcraft#1110 as commit 10d6d55a, rendering this Renovate PR redundant.

Evaluated by: mr-cal-bot

No scores available.

Issue body

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [requests](https://requests.readthedocs.io) ([source](https://togithub.com/psf/requests), [changelog](https://togithub.com/psf/requests/blob/master/HISTORY.md)) | `==2.28.2` -> `==2.31.0` | [![age](https://badges.renovateapi.com/packages/pypi/requests/2.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/requests/2.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/requests/2.31.0/compatibility-slim/2.28.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/requests/2.31.0/confidence-slim/2.28.2)](https://docs.renovatebot.com/merge-confidence/) | ### GitHub Vulnerability Alerts #### [CVE-2023-32681](https://togithub.com/psf/requests/security/advisories/GHSA-j8r2-6x86-q33q) ### 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](https://togithub.com/psf/requests/blob/f2629e9e3c7ce3c3c8c025bcd8db551101cbc773/requests/sessions.py#L319-L328) 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`](https://togithub.com/psf/requests/blob/f2629e9e3c7ce3c3c8c025bcd8db551101cbc773/requests/adapters.py#L199-L235). 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@&#8203;gmail.com) --- ### Release Notes <details> <summary>psf/requests</summary> ### [`v2.31.0`](https://togithub.com/psf/requests/blob/HEAD/HISTORY.md#&#8203;2310-2023-05-22) [Compare Source](https://togithub.com/psf/requests/compare/v2.30.0...v2.31.0) **Security** - Versions of Requests between v2.3.0 and v2.30.0 are vulnerable to potential forwarding of `Proxy-Authorization` headers to destination servers when following HTTPS redirects. When proxies are defined with user info (https://user:pass@proxy:8080), Requests will construct a `Proxy-Authorization` header that is attached to the request to authenticate with the proxy. In cases where Requests receives a redirect response, it previously reattached the `Proxy-Authorization` header incorrectly, resulting in the value being sent through the tunneled connection to the destination server. Users who rely on defining their proxy credentials in the URL are *strongly* encouraged to upgrade to Requests 2.31.0+ to prevent unintentional leakage and rotate their proxy credentials once the change has been fully deployed. Users who do not use a proxy or do not supply their proxy credentials through the user information portion of their proxy URL are not subject to this vulnerability. Full details can be read in our [Github Security Advisory](https://togithub.com/psf/requests/security/advisories/GHSA-j8r2-6x86-q33q) and [CVE-2023-32681](https://nvd.nist.gov/vuln/detail/CVE-2023-32681). ### [`v2.30.0`](https://togithub.com/psf/requests/blob/HEAD/HISTORY.md#&#8203;2300-2023-05-03) [Compare Source](https://togithub.com/psf/requests/compare/v2.29.0...v2.30.0) **Dependencies** - ⚠️ Added support for urllib3 2.0. ⚠️ This may contain minor breaking changes so we advise careful testing and reviewing https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html prior to upgrading. Users who wish to stay on urllib3 1.x can pin to `urllib3<2`. ### [`v2.29.0`](https://togithub.com/psf/requests/blob/HEAD/HISTORY.md#&#8203;2290-2023-04-26) [Compare Source](https://togithub.com/psf/requests/compare/v2.28.2...v2.29.0) **Improvements** - Requests now defers chunked requests to the urllib3 implementation to improve standardization. ([#&#8203;6226](https://togithub.com/psf/requests/issues/6226)) - Requests relaxes header component requirements to support bytes/str subclasses. ([#&#8203;6356](https://togithub.com/psf/requests/issues/6356)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" in timezone Etc/UTC, Automerge - "before 07:00" in timezone Etc/UTC. 🚦 **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 --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/canonical/charmcraft). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45OC40IiwidXBkYXRlZEluVmVyIjoiMzUuOTguNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Renovate's requests 2.28.2 -> 2.31.0 security PR was closed empty (0 files) after autoclosing was skipped due to a modified branch; the identical CVE-2023-32681 upgrade landed via merged Dependabot PR #1110 (10d6d55a).
stealth/space-bunny-alpha — closed superseded Abandoned with no file changes; the same Requests 2.31.0 security upgrade later merged in canonical/charmcraft#1110 (10d6d55a), replacing 2.28.2 and addressing CVE-2023-32681.
qwen/qwen3.6-35b-a3b — — Renovate-generated dependency update to requests v2.31.0 for CVE-2023-32681 was closed and abandoned. Autoclosing was skipped due to branch modifications, leading to manual closure.
qwen3.6-35b-a3b-mtp-q6 — — Security update for requests to v2.31.0 was abandoned and closed. Renovate skipped autoclosing due to branch modifications, but the dependency change was never merged.

Update history

No update history recorded yet.

Related work

  • Superseded By: canonical/charmcraft#1110 (confidence 92%)

    Dependabot PR 'build(deps): bump requests from 2.28.2 to 2.31.0' merged as commit 10d6d55a, landing the exact same version bump and CVE-2023-32681 remediation that this abandoned Renovate PR proposed.

Related issues

Issue Project State Summary Similarity
#4812 chore(deps): update dependency requests to v2.32.0 [security] - autoclosed snapcraft closed Renovate PR #4812 was autoclosed unmerged after 856 days; the security upgrade was later delivered by #5064 (commit ec4f9b16f), raising requests from 2.31.0 to 2.32.2.
92%
#61 chore(deps): update dependency requests to v2.32.2 [security] - autoclosed imagecraft closed Renovate's requests 2.32.2 update was autoclosed unmerged; requests was later updated to 2.33.0 by merged PR #308 (commit cbca1c1).
92%
#1689 chore(deps): update dependency requests to v2.32.0 [security] - autoclosed charmcraft closed Renovate’s requests 2.32.0 security update was autoclosed unmerged after 864 days, with no reviews, comments, or CI checks.
90%
#4856 chore(deps): update dependency requests to v2.32.2 [security] - autoclosed snapcraft closed PR #4856 was autoclosed without merge; the same requests 2.32.2 security update later landed via #5064 (ec4f9b16f).
88%
#52 chore(deps): update dependency requests to v2.32.2 [security] - autoclosed imagecraft closed Renovate PR #52 was not merged and was autoclosed; canonical/imagecraft#308 later moved requests to 2.33.0.
87%
#1709 chore(deps): update dependency requests to v2.32.2 [security] charmcraft closed Requests 2.32.2 security update #1709 was closed unmerged due to dependency conflicts; its pin change was not applied. A later merged update reached Requests 2.33.0 in #2612 (3a73fbc1).
85%
#4902 chore(deps): update dependency zipp to v3.19.1 [security] - autoclosed snapcraft closed Renovate's zipp 3.17.0/3.18.1 -> 3.19.1 security bump (CVE-2024-5569) was autoclosed because Dependabot PR #4901 merged the identical update in commit de7f1d5ad.
83%
#386 chore(deps): update dependency types-requests to v2.31.0.10 rockcraft closed Renovate's types-requests 2.31.0.10 update was closed unmerged because it required an incompatible, too-new urllib3; Renovate ignored that version.
82%
#4773 chore(deps): update dependency pip to v23 [security] - autoclosed snapcraft closed Renovate PR #4773 was autoclosed without merge; Dependabot PR #4776 superseded it by merging the same pip 22.0.2→23.3 docs upgrade in commit 99387d281.
81%
#68 chore(deps): update dependency pydantic_core to v2.27.2 - autoclosed imagecraft closed Renovate's pydantic_core 2.27.2 bump in #68 was autoclosed unmerged after inactivity; no resolving commit or replacement PR was identified.
80%