Skip to main content

Python shutil EUVDEUVD-2026-25922

| CVE-2026-3087 MEDIUM
Path Traversal (CWE-22)
2026-04-27 cna@python.org
6.0
CVSS 4.0 · Vendor: python
Share

Severity by source

Vendor (python) PRIMARY
6.0 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/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
vuln.today AI
7.5 HIGH

No authentication inherent to the library; Windows-only prerequisite captured by context, not AC; high integrity from arbitrary write; no confidentiality or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (python).

CVSS VectorVendor: python

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

4
Source Code Evidence Fetched
Jul 24, 2026 - 04:59 vuln.today
Analysis Generated
Jul 24, 2026 - 04:59 vuln.today
EUVD ID Assigned
Apr 27, 2026 - 21:22 euvd
EUVD-2026-25922
CVE Published
Apr 27, 2026 - 21:16 nvd
MEDIUM 6.0

DescriptionCVE.org

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.

AnalysisAI

Path traversal in CPython's shutil.unpack_archive() on Windows allows arbitrary file writes outside the intended extraction directory when processing ZIP archives containing Windows drive-letter absolute paths (e.g., C:\..., D:\...). The existing sanitization in _unpack_zipfile() rejected only Unix-style absolute paths (/) and directory traversal sequences (..), leaving Windows drive specifiers completely unchecked. No public exploit has been identified at time of analysis; EPSS of 0.05% (14th percentile) and SSVC exploitation status of 'none' indicate no observed exploitation, though the high integrity impact warrants patching in environments that process untrusted ZIP archives on Windows.

Technical ContextAI

The vulnerable code in Lib/shutil.py iterated over ZIP entries and used os.path.join(extract_dir, *name.split('/')) to construct target paths. On Windows, Python's os.path.join() silently discards preceding components when a path element contains a drive root (e.g., C:\), so a ZIP entry named C:/Windows/evil.dll would resolve entirely to C:\Windows\evil.dll, ignoring extract_dir. The original filter checked only for names starting with / or containing .., missing Windows-specific absolute forms such as C:/, D:\, E:relative, //server/share, and \\server2\share. The CWE-22 root cause is path traversal via absolute path injection rather than relative component escape. CPE strings confirm all CPython versions are affected (cpe:2.3:a:python:python:*:*:*:*:*:*:*:*) exclusively on Windows; macOS and Linux handle these path components literally and are not vulnerable. The fix (PR #146591) replaces manual extraction with zipfile.ZipFile.extractall() under a new _ignore_invalid_names flag and adds os.path.splitroot() logic in zipfile._extract_member() to detect and discard entries with drive letters, root separators, or post-sanitization name changes.

RemediationAI

Upgrade to a patched CPython release once available; fixes have been committed to multiple CPython maintenance branches via commits ab5ef98, b01e594, fc829e8, 65b2554, 8e13025, 8ee6aff, and ba0aca3 (consolidated in PR #146591 at https://github.com/python/cpython/pull/146591), but a specific tagged release version containing these patches has not been confirmed in the available data - monitor the Python security announcements list at https://mail.python.org/archives/list/security-announce@python.org/ for an official release notice. As an interim compensating control, applications that process user-supplied ZIP files on Windows should pre-filter all member filenames before calling shutil.unpack_archive(), rejecting any entry whose name matches a Windows drive-letter pattern (e.g., re.match(r'^[A-Za-z]:', name)) or any absolute-rooted form; this adds a validation step that the callee currently omits. Alternatively, replace shutil.unpack_archive() with a custom extraction loop that calls os.path.splitroot() and discards entries where the drive or root component is non-empty. Restricting upload functionality to authenticated, trusted users reduces exposure but does not eliminate the path traversal defect. Running the Python process under a low-privilege account without write access to sensitive system directories (e.g., C:\Windows\System32) is a defense-in-depth measure that limits the impact of successful exploitation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Share

EUVD-2026-25922 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy