Skip to content
OpenAdvisories
Medium · 6.0 CVE-2026-3087 EUVD-2026-25922GHSA-7r27-jhmm-vmp6

shutil.unpack_archive() doesn't check for Windows absolute paths in ZIPs

Published Apr 27, 2026 · Updated Aug 13, 2026 · Assigned by PSF

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.

Affected products

VendorProductAffectedFixed
Python Software Foundation CPython < 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 3.10.21

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python3 3.12.9-14 —

References