Medium

Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function

  • Disclosed: 25.03.2026
  • Updated: 11.10.2026 15:17

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) requests < 2.33.0 2.33.0

References

CVSS score 4.4/10
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness (CWE)
CWE-377
Platform
Python (PyPI)
Package
requests
Disclosed
25.03.2026
Updated
11.10.2026 15:17

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2275 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-gc5v-m9x4-r6x2 - CC BY 4.0

Vulnerability history: requests

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
8
First → latest
10.2014 03.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 7

Disclosures per year

  1. 2017: 0
  2. 2018: 1
  3. 2019: 0
  4. 2020: 0
  5. 2021: 0
  6. 2022: 0
  7. 2023: 1
  8. 2024: 1
  9. 2025: 1
  10. 2026: 1

earlier: 3

  1. Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function this entry
    Medium · 4.4 CVE-2026-25645 < 2.33.0 2.33.0
  2. Medium · 5.3 CVE-2024-47081 < 2.32.4 2.32.4
  3. Medium · 6.1 CVE-2023-32681 >= 2.3.0, < 2.31.0 2.31.0
  4. High · 7.5 CVE-2018-18074 < 2.20.0 2.20.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.