shutil.unpack_archive() doesn't check for Windows absolute paths in ZIPs
Summary
| CVE | CVE-2026-3087 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-04-27 21:16:42 UTC |
| Updated | 2026-06-05 00:25:35 UTC |
| 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. |
Risk And Classification
Primary CVSS: v4.0 6 MEDIUM from [email protected]
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.001500000 probability, percentile 0.352400000 (date 2026-06-09)
Problem Types: CWE-22 | CWE-22 CWE-22
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 6 | MEDIUM | 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/E:X/C... |
| 4.0 | CNA | CVSS | 6 | MEDIUM | 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 |
| 3.1 | [email protected] | Primary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
PresentPrivileges Required
LowUser Interaction
NoneConfidentiality
NoneIntegrity
HighAvailability
NoneSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
HighAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Microsoft | Windows | - | All | All | All |
| Application | Python | Python | 3.15.0 | alpha1 | All | All |
| Application | Python | Python | 3.15.0 | alpha2 | All | All |
| Application | Python | Python | 3.15.0 | alpha3 | All | All |
| Application | Python | Python | 3.15.0 | alpha4 | All | All |
| Application | Python | Python | 3.15.0 | alpha5 | All | All |
| Application | Python | Python | 3.15.0 | alpha6 | All | All |
| Application | Python | Python | 3.15.0 | alpha7 | All | All |
| Application | Python | Python | 3.15.0 | alpha8 | All | All |
| Application | Python | Python | All | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Python Software Foundation | CPython | affected 3.14.5rc1 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.15.0a1 3.15.0b1 python | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/python/cpython/commit/ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19 | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/65b255416ae217bf0e22085be3c1976cea18bd8c | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/8ee6aff14054b37b53e47194a2fa313e98163c94 | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/fc829e88753858c8ac669594bf0093f44948c0f4 | [email protected] | github.com | Patch |
| github.com/python/cpython/issues/146581 | [email protected] | github.com | Exploit, Issue Tracking, Patch, Vendor Advisory |
| mail.python.org/archives/list/[email protected]/thread/X6FXE5C6KDK... | [email protected] | mail.python.org | Mailing List, Vendor Advisory |
| github.com/python/cpython/commit/ab5ef98af693bded74a738570e81ea70abef2840 | [email protected] | github.com | Patch |
| github.com/python/cpython/pull/146591 | [email protected] | github.com | Issue Tracking, Patch |
| github.com/python/cpython/commit/8e13025747e1ca72e86d1f35637123f9c306f0cb | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/b01e594fbe754a960212f908d047294e880b52fd | [email protected] | github.com | Patch |
| www.openwall.com/lists/oss-security/2026/04/28/9 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Mailing List, Third Party Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Serhiy Storchaka (https://github.com/serhiy-storchaka) (en)
CNA: Seth Larson (https://github.com/sethmlarson) (en)
CNA: GGAutomaton (https://github.com/GGAutomaton) (en)
There are currently no legacy QID mappings associated with this CVE.