Vulnerability · Published Mar 25, 2026 · Assigned by GitHub_M
CVE-2026-25645Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function
Medium 4.4
In plain English
A medium-severity security flaw in requests from psf. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-requests | 2.33.1-r0 | ALPINE-CVE-2026-25645 |
| Alpine:v3.21 | py3-requests | 2.33.1-r0 | ALPINE-CVE-2026-25645 |
| Alpine:v3.22 | py3-requests | 2.33.1-r0 | ALPINE-CVE-2026-25645 |
| Alpine:v3.23 | py3-requests | 2.33.1-r0 | ALPINE-CVE-2026-25645 |
| Alpine:v3.24 | py3-requests | 2.33.1-r0 | ALPINE-CVE-2026-25645 |
| Debian:12 | requests | no fix listed | DEBIAN-CVE-2026-25645 |
| Debian:13 | requests | no fix listed | DEBIAN-CVE-2026-25645 |
| Debian:14 | requests | 2.34.2-1 | DEBIAN-CVE-2026-25645 |
| PyPI | requests | 2.33.0 | GHSA-gc5v-m9x4-r6x2 |
| PyPI | requests | 2.33.0 | PYSEC-2026-2275 |
| Ubuntu:25.10 | python-pip | no fix listed | UBUNTU-CVE-2026-25645 |
| Ubuntu:26.10 | python-pip | no fix listed | UBUNTU-CVE-2026-25645 |
| Ubuntu:22.04:LTS | requests | 2.25.1+dfsg-2ubuntu0.4 | USN-8825-1 |
| Ubuntu:22.04:LTS | requests | 2.25.1+dfsg-2ubuntu0.4 | UBUNTU-CVE-2026-25645 |
| Ubuntu:24.04:LTS | requests | 2.31.0+dfsg-1ubuntu1.2 | UBUNTU-CVE-2026-25645 |
| Ubuntu:24.04:LTS | requests | 2.31.0+dfsg-1ubuntu1.2 | USN-8825-1 |
| Ubuntu:25.10 | requests | no fix listed | UBUNTU-CVE-2026-25645 |
| Ubuntu:26.04:LTS | requests | 2.32.5+dfsg-1ubuntu1.1 | USN-8825-1 |
| Ubuntu:26.04:LTS | requests | 2.32.5+dfsg-1ubuntu1.1 | UBUNTU-CVE-2026-25645 |
Affected products (as reported)
Weakness: CWE-377 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N
References
- https://github.com/psf/requests/security/advisories/GHSA-gc5v-m9x4-r6x2 x_refsource_CONFIRM
- https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7 x_refsource_MISC
- https://github.com/psf/requests/releases/tag/v2.33.0 x_refsource_MISC