CVE-2026-3087: CWE-22 in Python Software Foundation CPython
CVE-2026-3087 is a directory traversal vulnerability in the Python CPython implementation affecting the shutil. unpack_archive() function on Windows. When given a ZIP archive containing an absolute Windows path with a drive letter (e. g. , C:\... ), the archive can be extracted outside the intended target directory. This behavior differs from other operating systems and can lead to files being placed in unintended locations. The vulnerability is rated medium severity with a CVSS score of 6. No official patch or remediation guidance has been provided yet by the Python Software Foundation. There are no known exploits in the wild at this time.
AI Analysis
Technical Summary
The vulnerability CVE-2026-3087 in Python's CPython arises from the shutil.unpack_archive() function improperly handling ZIP archives that contain absolute Windows paths with drive letters. On Windows systems, this causes the extraction process to place files outside the specified target directory, enabling directory traversal (CWE-22). This issue is specific to Windows and does not affect other operating systems. The vulnerability has a CVSS 4.0 score of 6, indicating a medium severity level. No patch or official remediation has been announced by the vendor as of the published date.
Potential Impact
Successful exploitation allows an attacker to craft a ZIP archive that, when unpacked using shutil.unpack_archive() on Windows, extracts files outside the intended directory. This could lead to overwriting or placing files in arbitrary locations on the filesystem, potentially impacting system integrity or security depending on the context in which the function is used. The vulnerability is limited to Windows platforms and does not affect other operating systems.
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 with shutil.unpack_archive() on Windows or implement additional validation to prevent extraction outside the target directory.
CVE-2026-3087: CWE-22 in Python Software Foundation CPython
Description
CVE-2026-3087 is a directory traversal vulnerability in the Python CPython implementation affecting the shutil. unpack_archive() function on Windows. When given a ZIP archive containing an absolute Windows path with a drive letter (e. g. , C:\... ), the archive can be extracted outside the intended target directory. This behavior differs from other operating systems and can lead to files being placed in unintended locations. The vulnerability is rated medium severity with a CVSS score of 6. No official patch or remediation guidance has been provided yet by the Python Software Foundation. There are no known exploits in the wild at this time.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-3087 in Python's CPython arises from the shutil.unpack_archive() function improperly handling ZIP archives that contain absolute Windows paths with drive letters. On Windows systems, this causes the extraction process to place files outside the specified target directory, enabling directory traversal (CWE-22). This issue is specific to Windows and does not affect other operating systems. The vulnerability has a CVSS 4.0 score of 6, indicating a medium severity level. No patch or official remediation has been announced by the vendor as of the published date.
Potential Impact
Successful exploitation allows an attacker to craft a ZIP archive that, when unpacked using shutil.unpack_archive() on Windows, extracts files outside the intended directory. This could lead to overwriting or placing files in arbitrary locations on the filesystem, potentially impacting system integrity or security depending on the context in which the function is used. The vulnerability is limited to Windows platforms and does not affect other operating systems.
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 with shutil.unpack_archive() on Windows or implement additional validation to prevent extraction outside the target directory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-02-23T23:14:46.433Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69efd1e7ba26a39fba655233
Added to database: 4/27/2026, 9:15:19 PM
Last enriched: 4/27/2026, 9:30:26 PM
Last updated: 4/27/2026, 10:49:26 PM
Views: 7
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.