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

Published Mar 25, 2026
·
Updated

Impact The requests.utils.extractzippedpaths() 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 extractzippedpaths() 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.

Other sources

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

Microsoft

Requests is a HTTP library. Prior to version 2.33.0, the requests.utils.extractzippedpaths() 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 extractzippedpaths() 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.

MITRE

Affected Software

8 affected componentsFixes available
pypi/requests<2.33.0
pip/requests<2.33.0
2.33.0
Python Requests<2.33.0
Microsoft azl3 python-requests 2.31.0-3
Microsoft azl3 python-requests 2.31.0-4
Microsoft cbl2 python-requests 2.27.1-8
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/requests to a version that resolves this vulnerability.

    Fixed in 2.33.0
  2. Upgrade

    Upgrade requests to a version that resolves this vulnerability.

    Fixed in 2.33.0
  3. Configuration

    If unable to upgrade, set TMPDIR in the environment to a directory with restricted write access to prevent pre-creation of malicious files in the temp directory.

    Environment TMPDIR = a directory with restricted write access

Event History

Mar 25, 2026
Advisory Published
via GitHub·04:56 PM
Data Sourced
via GitHub·04:56 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·05:02 PM
Data Sourced
via MITRE·05:02 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 29, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
Affected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25645?

CVE-2026-25645 is classified as a high severity vulnerability due to the potential for unauthorized file overwriting.

2

How do I fix CVE-2026-25645?

To fix CVE-2026-25645, update the requests library to version 2.33.0 or later.

3

What is the impact of CVE-2026-25645?

The impact of CVE-2026-25645 includes the risk of overwriting existing files in the system temporary directory.

4

Which versions of requests are affected by CVE-2026-25645?

CVE-2026-25645 affects all versions of requests up to but not including version 2.33.0.

5

Where can I find more information about CVE-2026-25645?

More information about CVE-2026-25645 can be found in the security advisories on the GitHub repository for requests.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203