CVE-2026-3087 PUBLISHED

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

Assigner: PSF
Reserved: 23.02.2026 Published: 27.04.2026 Updated: 28.04.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 6

Product Status

Vendor Python Software Foundation
Product CPython
Versions Default: unaffected
  • Version 0 is affected

Credits

  • Serhiy Storchaka (https://github.com/serhiy-storchaka) remediation developer
  • Seth Larson (https://github.com/sethmlarson) coordinator
  • GGAutomaton (https://github.com/GGAutomaton) reporter

References

Problem Types

  • CWE-22 CWE