Skip to main content
EPSS 0.6%top 56%

CVE-2026-3087: CWE-22 in Python Software Foundation CPython

0
High
Published: 08/19/2026 (08/19/2026, 11:42:48 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

Python Software Foundation

CPython

Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.14>=3.14.0a1 <3.14.5rc1>=3.15.0a1 <3.15.0b1
cpython
pkg:pypi/cpython
Affected versions
=3.14.0=3.15.0
GitHub Actionsmore threats →cve
CPython
pkg:github/CPython
Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.14>=3.14.0a1 <3.14.5rc1>=3.15.0a1 <3.15.0b1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/12/2026, 14:19:18 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses