CVE-2026-3087 shutil.unpack_archive() doesn't check for Windows absolute paths in ZIPs

Medium 6.0 Published Updated

Attackers can extract files outside the target directory on Windows using absolute paths in ZIP archives, potentially leading to arbitrary file writes or code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-3087?

CVE-2026-3087 is a medium-severity path traversal vulnerability in Python Python, published on 27 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2026-3087?

3 open source packages ship an affected version, including libpython, python and python-min. It affects 1 product.

PackageAffectedFixed in
libpython BitnamiAll versions3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5
python BitnamiAll versions3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5
python-min BitnamiAll versions3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5

Products include Python Python.

How do I fix CVE-2026-3087?

Upgrade libpython to a fixed version for your release line: 3.10.21, 3.11.16, 3.12.14 or 3.13.14.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-3087 being exploited?

There is no known exploitation of CVE-2026-3087 in the wild and no public exploit code.

All Python Python vulnerabilities

Sources

Also known as AZL-85274, BIT-libpython-2026-3087, BIT-python-2026-3087, BIT-python-min-2026-3087, GHSA-7r27-jhmm-vmp6, MINI-4gj2-v85m-7mgj and 5 more.

Is CVE-2026-3087 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free