shutil.unpack_archive() doesn't check for Windows absolute paths in ZIPs
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.
- Published
- Apr 27, 2026
- Updated
- Aug 13, 2026
- EPSS
- 0.7% · 52th percentile
- CWE
- CWE-22
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
24
Monitor
Low priority for now.
- CVSS
- 24 / 40 · 6.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.7%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · PSF
- 6.0
- NVD has not scored this yet; the score shown is the CNA’s.
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
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- python pythonup to 3.14.4 inclusive
- python python3.15.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (PSF). Independent of NVD's CPE analysis and usually ahead of it.
Python Software Foundation CPython
- before 3.10.21affected · python
- 3.11.0 and later · before 3.11.16affected · python
- 3.12.0 and later · before 3.12.14affected · python
- 3.13.0 and later · before 3.13.14affected · python
- 3.14.0a1 and later · before 3.14.5rc1affected · python
- 3.15.0a1 and later · before 3.15.0b1affected · python
Same product
python: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2 all47Plan
- CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remot47Plan
- CVE-2021-3177Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Pyth46Plan
- CVE-2014-4650The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which al46Plan
- CVE-2018-1000802Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('C45Plan
- CVE-2020-27619In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.42Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Python Software Foundation CPython | 3.10.21 | Vendor (CNA) |
| Python Software Foundation CPython | 3.11.16 | Vendor (CNA) |
| Python Software Foundation CPython | 3.12.14 | Vendor (CNA) |
| Python Software Foundation CPython | 3.13.14 | Vendor (CNA) |
| Python Software Foundation CPython | 3.14.5rc1 | Vendor (CNA) |
| Python Software Foundation CPython | 3.15.0b1 | Vendor (CNA) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
- python/cpythoncommit 1071290
- python/cpythoncommit 65b2554
- python/cpythoncommit 7ef7dd0
- python/cpythoncommit 8e13025
- python/cpythoncommit 8ee6aff
- python/cpythoncommit a6650a2
- python/cpythoncommit ab5ef98
- python/cpythoncommit b01e594
- python/cpythoncommit ba0aca3
- python/cpythoncommit fc829e8
- python/cpythonPR 146591
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Seth Larson (https://github.com/sethmlarson)coordinator
- GGAutomaton (https://github.com/GGAutomaton)reporter
- Serhiy Storchaka (https://github.com/serhiy-storchaka)remediation developer
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')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/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-secondary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) { return res.sendStatus(400);}res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/python/cpython/commit/1071290169f85c09cf767c1099564a9426cdc7e8
- github.com/python/cpython/commit/65b255416ae217bf0e22085be3c1976cea18bd8c
- github.com/python/cpython/commit/7ef7dd0a74f47facd1fadcbc77f8fb03beb5eb4d
- github.com/python/cpython/commit/8e13025747e1ca72e86d1f35637123f9c306f0cb
- github.com/python/cpython/commit/8ee6aff14054b37b53e47194a2fa313e98163c94
- github.com/python/cpython/commit/a6650a2cdf0c49fb8ce0c982903aa2aa274beefe
- github.com/python/cpython/commit/ab5ef98af693bded74a738570e81ea70abef2840
- github.com/python/cpython/commit/b01e594fbe754a960212f908d047294e880b52fd
- github.com/python/cpython/commit/ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19
- github.com/python/cpython/commit/fc829e88753858c8ac669594bf0093f44948c0f4
- github.com/python/cpython/pull/146591
- mail.python.org/archives/list/security-announce@python.org/thread/X6FXE5C6KDKOVNX3EC3DWD5RUPFWOZA4/
- www.openwall.com/lists/oss-security/2026/04/28/9
Vendor advisories and official records. Exploit/PoC links are deliberately left out.