Python/requests/2.31.0
Python HTTP for Humans.
https://pypi.org/project/requests
Apache-2.0
3 Security Vulnerabilities
Requests vulnerable to .netrc credentials leak via malicious URLs
- https://github.com/psf/requests/security/advisories/GHSA-9hjg-9r4m-mvj7
- https://nvd.nist.gov/vuln/detail/CVE-2024-47081
- https://github.com/psf/requests/pull/6965
- https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef
- https://requests.readthedocs.io/en/latest/api/#requests.Session.trust_env
- https://seclists.org/fulldisclosure/2025/Jun/2
- http://seclists.org/fulldisclosure/2025/Jun/2
- http://www.openwall.com/lists/oss-security/2025/06/03/11
- http://www.openwall.com/lists/oss-security/2025/06/03/9
- http://www.openwall.com/lists/oss-security/2025/06/04/1
- http://www.openwall.com/lists/oss-security/2025/06/04/6
- https://github.com/advisories/GHSA-9hjg-9r4m-mvj7
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
Requests `Session` object does not verify requests after making first request with verify=False
- https://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56
- https://github.com/psf/requests/pull/6655
- https://github.com/psf/requests/commit/a58d7f2ffb4d00b46dca2d70a3932a0b37e22fac
- https://nvd.nist.gov/vuln/detail/CVE-2024-35195
- https://github.com/advisories/GHSA-9wx4-h78v-vm56
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IYLSNK5TL46Q6XPRVMHVWS63MVJQOK4Q
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/N7WP6EYDSUOCOJYHDK5NX43PYZ4SNHGZ
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.
Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function
- https://github.com/psf/requests/security/advisories/GHSA-gc5v-m9x4-r6x2
- https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7
- https://github.com/psf/requests/releases/tag/v2.33.0
- https://github.com/advisories/GHSA-gc5v-m9x4-r6x2
- https://nvd.nist.gov/vuln/detail/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.
163 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 2.34.2 | Apache-2.0 | |||
| 2.34.1 | Apache-2.0 | |||
| 2.34.0 | Apache-2.0 | |||
| 2.34.0.dev1 | Apache-2.0 | |||
| 2.33.1 | Apache-2.0 | |||
| 2.33.0 | Apache-2.0 | |||
| 2.32.5 | Apache-2.0 | 1 | ||
| 2.32.4 | Apache-2.0 | 1 | ||
| 2.32.3 | Apache-2.0 | 2 | 1970-01-01 - 00:00 | over 56 years |
| 2.32.2 | Apache-2.0 | 2 | 1970-01-01 - 00:00 | over 56 years |
| 2.32.1 | Apache-2.0 | 2 | 1970-01-01 - 00:00 | over 56 years |
| 2.32.0 | Apache-2.0 | 2 | 1970-01-01 - 00:00 | over 56 years |
| 2.31.0 | Apache-2.0 | 3 | 1970-01-01 - 00:00 | over 56 years |
| 2.30.0 | Apache-2.0 | 4 | 1970-01-01 - 00:00 | over 56 years |
| 2.29.0 | Apache-2.0 | 4 | 1970-01-01 - 00:00 | over 56 years |
| 2.28.2 | Apache-2.0 | 4 | 1970-01-01 - 00:00 | over 56 years |
| 2.28.1 | Apache-2.0 | 4 | 2022-06-29 - 15:13 | almost 4 years |
| 2.28.0 | Apache-2.0 | 4 | 2022-06-09 - 14:44 | almost 4 years |
| 2.27.1 | Apache-2.0 | 4 | 2022-01-05 - 15:40 | over 4 years |
| 2.27.0 | Apache-2.0 | 4 | 2022-01-03 - 15:09 | over 4 years |
| 2.26.0 | Apache-2.0 | 4 | 2021-07-13 - 14:55 | almost 5 years |
| 2.25.1 | Apache-2.0 | 4 | 2020-12-16 - 19:38 | over 5 years |
| 2.25.0 | Apache-2.0 | 4 | 2020-11-11 - 20:05 | over 5 years |
| 2.24.0 | Apache-2.0 | 4 | 2020-06-17 - 16:30 | almost 6 years |
| 2.23.0 | Apache-2.0 | 4 | 2020-06-17 - 16:30 | almost 6 years |
| 2.22.0 | Apache-2.0 | 4 | 2019-05-16 - 14:37 | about 7 years |
| 2.21.0 | Apache-2.0 | 4 | 2018-12-10 - 15:40 | over 7 years |
| 2.20.1 | Apache-2.0 | 4 | 2018-11-08 - 17:20 | over 7 years |
| 2.20.0 | Apache-2.0 | 4 | 2018-10-18 - 15:46 | over 7 years |
| 2.19.1 | Apache-2.0 | 5 | 2018-06-14 - 13:40 | almost 8 years |
| 2.19.0 | Apache-2.0 | 5 | 2018-06-12 - 14:46 | almost 8 years |
| 2.18.4 | Apache-2.0 | 5 | 2017-08-15 - 13:23 | almost 9 years |
| 2.18.3 | Apache-2.0 | 5 | 2017-08-02 - 13:23 | almost 9 years |
| 2.18.2 | Apache-2.0 | 5 | 2017-07-25 - 15:23 | almost 9 years |
| 2.18.1 | Apache-2.0 | 5 | 2017-06-14 - 17:51 | almost 9 years |
| 2.18.0 | Apache-2.0 | 5 | 2017-06-14 - 15:44 | almost 9 years |
| 2.17.3 | Apache-2.0 | 5 | 2017-05-29 - 21:53 | almost 9 years |
| 2.17.2 | Apache-2.0 | 5 | 2017-05-29 - 21:33 | almost 9 years |
| 2.17.1 | Apache-2.0 | 5 | 2017-05-29 - 19:59 | almost 9 years |
| 2.17.0 | Apache-2.0 | 5 | 2017-05-29 - 17:24 | almost 9 years |
| 2.16.5 | Apache-2.0 | 5 | 2017-05-28 - 04:35 | almost 9 years |
| 2.16.4 | Apache-2.0 | 5 | 2017-05-27 - 21:17 | almost 9 years |
| 2.16.3 | Apache-2.0 | 5 | 2017-05-27 - 16:24 | almost 9 years |
| 2.16.2 | Apache-2.0 | 5 | 2017-05-27 - 14:53 | almost 9 years |
| 2.16.1 | Apache-2.0 | 5 | 2017-05-27 - 13:43 | almost 9 years |
| 2.16.0 | Apache-2.0 | 5 | 2017-05-27 - 03:45 | almost 9 years |
| 2.15.1 | Apache-2.0 | 5 | 2017-05-27 - 02:14 | almost 9 years |
| 2.15.0 | Apache-2.0 | 5 | 1970-01-01 - 00:00 | over 56 years |
| 2.14.2 | Apache-2.0 | 5 | 2017-05-10 - 14:05 | about 9 years |
| 2.14.1 | Apache-2.0 | 5 | 2017-05-09 - 19:00 | about 9 years |
