MediumGHSA-gc5v-m9x4-r6x2CVE-2026-25645PYSEC-2026-2275

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

Published 25 Mar 2026 · Updated 10 Sept 2026

Is your project on an affected requests?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.33.0
Fixed in
2.33.0
Update to the fixed version for your release line, for example:pip install 'requests>=2.33.0'

Details

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.

Is GHSA-gc5v-m9x4-r6x2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected requests, and gives you the command that fixes it.

More advisories for requests

  • MediumCVE-2024-47081Requests vulnerable to .netrc credentials leak via malicious URLs · 9 Jun 2025
  • MediumCVE-2024-35195Requests `Session` object does not verify requests after making first request with verify=False · 20 May 2024
  • MediumCVE-2023-32681Unintended leak of Proxy-Authorization header in requests · 22 May 2023
  • MediumCVE-2014-1829Exposure of Sensitive Information to an Unauthorized Actor in Requests · 17 May 2022
  • MediumCVE-2014-1830Exposure of Sensitive Information to an Unauthorized Actor in Requests · 14 May 2022
  • MediumCVE-2015-2296Python Requests Session Fixation · 13 May 2022
All 8 advisories for requests

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.