CVE-2026-3087: CWE-22 in Python Software Foundation CPython
If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then the archive will be extracted outside the target directory which is different than other operating systems. Only Windows is affected by this vulnerability.
AI Analysis
Technical Summary
The vulnerability CVE-2026-3087 in CPython's shutil.unpack_archive() function allows a ZIP archive with absolute Windows paths containing drive letters to be extracted outside the specified target directory on Windows systems. This is a path traversal issue (CWE-22) that can lead to files being placed in unintended locations, potentially overwriting or creating files outside the extraction directory. This behavior is unique to Windows and does not affect other operating systems. The affected versions explicitly include CPython 3.14.0, 3.15.0, and their alpha releases. No official patch or remediation level has been published by the Python Software Foundation at this time.
Potential Impact
An attacker who can supply a crafted ZIP archive to shutil.unpack_archive() on Windows can cause files to be extracted outside the intended directory. This could lead to overwriting critical files or placing malicious files in sensitive locations. The impact depends on the context in which the function is used and the privileges of the executing process. The vulnerability is rated medium severity with a CVSS 4.0 score of 6.0.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should avoid unpacking untrusted ZIP archives containing absolute Windows paths with drive letters using shutil.unpack_archive() on Windows or implement additional validation to sanitize archive contents before extraction.
CVE-2026-3087: CWE-22 in Python Software Foundation CPython
Description
If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then the archive will be extracted outside the target directory which is different than other operating systems. Only Windows is affected by this vulnerability.
CVSS v4.0
Score 6.0medium
Affected software
Python Software Foundation
CPython
pkg:github/CPythonRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-3087 in CPython's shutil.unpack_archive() function allows a ZIP archive with absolute Windows paths containing drive letters to be extracted outside the specified target directory on Windows systems. This is a path traversal issue (CWE-22) that can lead to files being placed in unintended locations, potentially overwriting or creating files outside the extraction directory. This behavior is unique to Windows and does not affect other operating systems. The affected versions explicitly include CPython 3.14.0, 3.15.0, and their alpha releases. No official patch or remediation level has been published by the Python Software Foundation at this time.
Potential Impact
An attacker who can supply a crafted ZIP archive to shutil.unpack_archive() on Windows can cause files to be extracted outside the intended directory. This could lead to overwriting critical files or placing malicious files in sensitive locations. The impact depends on the context in which the function is used and the privileges of the executing process. The vulnerability is rated medium severity with a CVSS 4.0 score of 6.0.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is released, users should avoid unpacking untrusted ZIP archives containing absolute Windows paths with drive letters using shutil.unpack_archive() on Windows or implement additional validation to sanitize archive contents before extraction.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-02-23T23:14:46.433Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69efd1e7ba26a39fba655233
Added to database: 04/27/2026, 21:15:19 UTC
Last enriched: 08/12/2026, 14:19:18 UTC
Last updated: 09/14/2026, 10:01:30 UTC
Views: 273
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.