What’s Vulnerable › Vulnerabilities
CVE-2026-25645: Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-03-25 · updated 2026-06-17
- Weakness: CWE-377
Description
Requests is a HTTP library. Prior to version 2.33.0, 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. Standard usage of the Requests library is not affected by this vulnerability. Only applications that call `extract_zipped_paths()` directly are impacted. Starting in version 2.33.0, the library 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.
Affected products
- psf requests: before 2.33.0 — fixed in 2.33.0
- Pypi Requests: before 2.33.0; 0.0.1, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4 (+151) — fixed in 2.33.0
How to fix
Upgrade to a fixed version: psf requests 2.33.0; Pypi Requests 2.33.0. Check the vendor advisory for mitigations.
References
- https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7
- https://github.com/psf/requests/releases/tag/v2.33.0
- https://github.com/psf/requests/security/advisories/GHSA-gc5v-m9x4-r6x2
Get alerted when CVE-2026-25645 or the next vulnerability affects your stack