Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction
CVE-2026-115791Published 10 Nov 2026, 16:33 UTC
Real-world risk
1.1/ 10Low
Routine
If the vulnerable configuration applies to you: 2.4
PreliminaryFrom the CVSS vector only · confidence low
CVSS
5.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from PSF)
When tarfile or zipfile command line interface (CLI) is used to decompress an archive, a Python script shadowing the stdlib can be created. Then if an error occurs during decompressing the next file, the newly created Python script is executed. This is especially true if the created Python is called traceback.py. The problem is that Python adds the current directory to sys.path when python -m MODULE is run, and the archive is also decompressed in the current directory. The fix removes sys.path[0] in gzip, tarfile and zipfile command line interface to prevent shadowing standard library modules from extracted files.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| CPythonUbiquitous | < 3.16.0 | 3.16.0 |
What to do
Update to a fixed version: 3.16.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.2% chance of exploitation in 30 days (percentile 6), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.158
- Threat T1: Nothing known0.850
- 10 × impact 0.8 × prerequisites 0.1575 × threat 0.851.071
- Rounded to one decimal between 0.1 and 101.1
Exploitation and evidence timeline
- 10 Nov 2026 Published
- 3 Dec 2026 Risk 1.1 (cvss fallback)
Weakness
CWE-829
References
- https://github.com/python/cpython/issues/161705issue-tracking
- https://github.com/python/cpython/pull/161706patch
- https://mail.python.org/archives/list/[email protected]/thread/ZKKA4Q7B35JEHSDIJNZ6TYKRDQJUHDAG/vendor-advisory
- http://www.openwall.com/lists/oss-security/2026/11/10/30
- CVE-2026-115791 on CVE.org