CVE-2026-3087
shutil.unpack_archive() doesn't check for Windows absolute paths in ZIPs
MEDIUM 6.0
At a glance
- Source
- NVD
- EPSS
- EPSS 0.55 % · percentile 46 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- PSF
- NVD status
- Modified
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.
Weaknesses (CWE)
- CWE-22 — Improper Limitation of a Pathname to a Restricted Directory
References
- https://github.com/python/cpython/pull/146591
- https://github.com/python/cpython/issues/146581
- https://mail.python.org/archives/list/security-announce@python.org/thread/X6FXE5C6KDKOVNX3EC3DWD5RUPFWOZA4/
- https://github.com/python/cpython/commit/ab5ef98af693bded74a738570e81ea70abef2840
- https://github.com/python/cpython/commit/b01e594fbe754a960212f908d047294e880b52fd
- https://github.com/python/cpython/commit/fc829e88753858c8ac669594bf0093f44948c0f4
- https://github.com/python/cpython/commit/65b255416ae217bf0e22085be3c1976cea18bd8c
- https://github.com/python/cpython/commit/8e13025747e1ca72e86d1f35637123f9c306f0cb
- https://github.com/python/cpython/commit/8ee6aff14054b37b53e47194a2fa313e98163c94
- https://github.com/python/cpython/commit/ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19
- https://github.com/python/cpython/commit/a6650a2cdf0c49fb8ce0c982903aa2aa274beefe
- https://github.com/python/cpython/commit/7ef7dd0a74f47facd1fadcbc77f8fb03beb5eb4d
- https://github.com/python/cpython/commit/1071290169f85c09cf767c1099564a9426cdc7e8
- http://www.openwall.com/lists/oss-security/2026/04/28/9
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 4.0 | MEDIUM 6.0 | 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 | PSF |
| CVSS 4.0 | MEDIUM 6.0 | 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 | NVD · cna@python.org (Secondary) |
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NVD · nvd@nist.gov (Primary) |
European references
- ENISA EUVD · EUVD-2026-25922
- GCVE · GCVE-0-2026-3087
CERT-FR advisories
- CERTFR-2026-AVI-1385 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2026-AVI-0505 — Vulnérabilité dans Python · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:python:python:*:*:*:*:*:*:*:*≤ 3.14.4cpe:2.3:a:python:python:3.15.0:alpha1:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha2:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha3:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha4:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha5:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha6:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha7:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha8:*:*:*:*:*:*
Affected products
| Product | Versions |
|---|---|
| Python Software Foundation · CPython | affected 0 < 3.10.21 ; affected 3.11.0 < 3.11.16 ; affected 3.12.0 < 3.12.14 ; affected 3.13.0 < 3.13.14 ; affected 3.14.0a1 < 3.14.5rc1 ; affected 3.15.0a1 < 3.15.0b1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |