[Security] Bump requests from 2.31.0 to 2.32.4 in /{{ cookiecutter.project_slug }}
Bumps requests from 2.31.0 to 2.32.4. This update includes security fixes.
Vulnerabilities fixed
Requests
Sessionobject does not verify requests after making first request with verify=False When making requests through a RequestsSession, if the first request is made withverify=Falseto disable cert verification, all subsequent requests to the same origin will continue to ignore cert verification regardless of changes to the value ofverify. This behavior will continue for the lifecycle of the connection in the connection pool.Remediation
Any of these options can be used to remediate the current issue, we highly recommend upgrading as the preferred mitigation.
- Upgrade to
requests>=2.32.0.- For
requests<2.32.0, avoid settingverify=Falsefor the first request to a host while using a Requests Session.- For
requests<2.32.0, callclose()onSessionobjects to clear existing connections ifverify=Falseis used.Related Links
Patched versions: 2.32.0 Affected versions: < 2.32.0
Requests vulnerable to .netrc credentials leak via malicious URLs
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=Falseon your Requests Session (docs).References
psf/requests#6965 https://seclists.org/fulldisclosure/2025/Jun/2
Patched versions: 2.32.4 Affected versions: < 2.32.4
Release notes
Sourced from requests's releases.
v2.32.4
2.32.4 (2025-06-10)
Security
- CVE-2024-47081 Fixed an issue where a maliciously crafted URL and trusted environment will retrieve credentials for the wrong hostname/machine from a netrc file. (#6965)
Improvements
- Numerous documentation improvements
Deprecations
- Added support for pypy 3.11 for Linux and macOS. (#6926)
- Dropped support for pypy 3.9 following its end of support. (#6926)
v2.32.3
2.32.3 (2024-05-29)
Bugfixes
- Fixed bug breaking the ability to specify custom SSLContexts in sub-classes of HTTPAdapter. (#6716)
- Fixed issue where Requests started failing to run on Python versions compiled without the
sslmodule. (#6724)v2.32.2
2.32.2 (2024-05-21)
Deprecations
To provide a more stable migration for custom HTTPAdapters impacted by the CVE changes in 2.32.0, we've renamed
_get_connectionto a new public API,get_connection_with_tls_context. Existing custom HTTPAdapters will need to migrate their code to use this new API.get_connectionis considered deprecated in all versions of Requests>=2.32.0.A minimal (2-line) example has been provided in the linked PR to ease migration, but we strongly urge users to evaluate if their custom adapter is subject to the same issue described in CVE-2024-35195. (#6710)
v2.32.1
2.32.1 (2024-05-20)
Bugfixes
- Add missing test certs to the sdist distributed on PyPI.
v2.32.0
2.32.0 (2024-05-20)
... (truncated)
Changelog
Sourced from requests's changelog.
2.32.4 (2025-06-10)
Security
- CVE-2024-47081 Fixed an issue where a maliciously crafted URL and trusted environment will retrieve credentials for the wrong hostname/machine from a netrc file.
Improvements
- Numerous documentation improvements
Deprecations
- Added support for pypy 3.11 for Linux and macOS.
- Dropped support for pypy 3.9 following its end of support.
2.32.3 (2024-05-29)
Bugfixes
- Fixed bug breaking the ability to specify custom SSLContexts in sub-classes of HTTPAdapter. (#6716)
- Fixed issue where Requests started failing to run on Python versions compiled without the
sslmodule. (#6724)2.32.2 (2024-05-21)
Deprecations
To provide a more stable migration for custom HTTPAdapters impacted by the CVE changes in 2.32.0, we've renamed
_get_connectionto a new public API,get_connection_with_tls_context. Existing custom HTTPAdapters will need to migrate their code to use this new API.get_connectionis considered deprecated in all versions of Requests>=2.32.0.A minimal (2-line) example has been provided in the linked PR to ease migration, but we strongly urge users to evaluate if their custom adapter is subject to the same issue described in CVE-2024-35195. (#6710)
2.32.1 (2024-05-20)
Bugfixes
- Add missing test certs to the sdist distributed on PyPI.
2.32.0 (2024-05-20)
Security
... (truncated)
Commits
-
021dc72Polish up release tooling for last manual release -
821770eBump version and add release notes for v2.32.4 -
59f8aa2Add netrc file search information to authentication documentation (#6876) -
5b4b64cAdd more tests to prevent regression of CVE 2024 47081 -
7bc4587Add new test to check netrc auth leak (#6962) -
96ba401Only use hostname to do netrc lookup instead of netloc -
7341690Merge pull request #6951 from tswast/patch-1 -
6716d7cremove links -
a7e1c74Update docs/conf.py -
c799b81docs: fix dead links to kenreitz.org - Additional commits viewable in compare view