# CVE-2026-25645: Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function

> A local attacker can exploit predictable temp file names in Requests' zip extraction to replace legitimate files with malicious ones, potentially leading to code execution.

- **Severity:** Medium 4.4 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Mar 2026
- **Updated:** 25 Mar 2026
- **Also known as:** ALPINE-CVE-2026-25645, AZL-80996, BELL-CVE-2026-25645, CLEANSTART-2026-AZ59995, CLEANSTART-2026-FE88742, CLSA-2026-1780879897, CLSA-2026-1781225614, CLSA-2026-1781225615, CLSA-2026-1787551818, DEBIAN-CVE-2026-25645, ECHO-74d4-cc6f-7870, GHSA-gc5v-m9x4-r6x2, MINI-2249-4pgh-55h8, MINI-2gjj-gxh3-q7gg, MINI-468x-jrqv-mx3m, MINI-4pcp-qh2w-p26j, MINI-6vr4-f5xr-4fcv, MINI-7242-r4g7-83mf, MINI-7493-j9qw-57xq, MINI-78rp-2vxc-h4fr, MINI-8r36-m5c7-3c2g, MINI-cfqx-99v2-hgcf, MINI-ffg9-337x-5j2v, MINI-g7m2-5mcg-r5jv, MINI-h2ph-583p-8rr7, MINI-mp65-jxq7-vxh2, MINI-wg7m-87p7-x23c, OESA-2026-1791, OESA-2026-1909, PYSEC-2026-2275, ROOT-APP-PYPI-CVE-2026-25645, SUSE-SU-2026:1218-1, SUSE-SU-2026:1644-1, SUSE-SU-2026:1647-1, SUSE-SU-2026:21036-1, SUSE-SU-2026:21063-1, SUSE-SU-2026:22055-1, SUSE-SU-2026:22091-1, UBUNTU-CVE-2026-25645, USN-8825-1, openSUSE-SU-2026:10455-1, openSUSE-SU-2026:20926-1

## What is CVE-2026-25645?

CVE-2026-25645 is a medium-severity path traversal vulnerability in psf requests, published on 25 Mar 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### 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.

Weakness: CWE-377 (DEPRECATED: Insecure Temporary File)

## Which versions are affected by CVE-2026-25645?

3 open source packages ship an affected version, including requests. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `requests` | PyPI | All versions | 2.33.0 |
| `requests` | PyPI | All versions | 2.33.0 |
| `requests` | PyPI | All versions | 2.33.0 |
| `python-requests` | SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 2.24.0-8.26.1 |
| `python-requests` | SUSE:Linux Enterprise Server 16.0 | All versions | 2.32.4-160000.3.1 |
| `python-requests` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.24.0-8.26.1 |
| `python-requests` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 2.32.4-160000.3.1 |
| `python-requests` | SUSE:Linux Micro 6.0 | All versions | 2.32.3-3.1 |
| `python-requests` | SUSE:Linux Micro 6.1 | All versions | 2.32.4-slfo.1.1_2.1 |
| `python-requests` | SUSE:Linux Micro 6.2 | All versions | 2.32.4-160000.3.1 |
| `python-requests` | openSUSE:Leap 16.0 | All versions | 2.32.4-160000.3.1 |
| `python-requests` | openSUSE:Tumbleweed | All versions | 2.33.0-1.1 |

Products: Python Requests.

## How do I fix CVE-2026-25645?

Upgrade requests to 2.33.0 or later.

## Is CVE-2026-25645 being exploited?

There is no known exploitation of CVE-2026-25645 in the wild and no public exploit code.

Public exploit code:

- Insecure Temp File Reuse in extract_zipped_paths() (github_poc): https://github.com/Jaycelation/CVE-2026-25645

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25645 and fix it if it is affected.

What it is: CVE-2026-25645 is a medium-severity path traversal vulnerability in psf requests, published on 25 Mar 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-25645 in the wild and no public exploit code.

Affected packages and fixed versions:
- requests (PyPI): affected all versions; fixed in 2.33.0
- requests (PyPI): affected all versions; fixed in 2.33.0
- requests (PyPI): affected all versions; fixed in 2.33.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25645/ (Markdown: https://insights.sbomify.com/CVE-2026-25645/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25645
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25645
- OSV: https://osv.dev/vulnerability/CVE-2026-25645

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25645/
Summaries are generated and may contain mistakes; the official description above is the record.
