Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Python Software FoundationCPython |
< 3.16.0→ 3.16.0 |
3.16.0 |
| Bitnamipython-min |
< 3.16.0→ 3.16.0 |
3.16.0 |
| Bitnamilibpython |
< 3.16.0→ 3.16.0 |
3.16.0 |
| Bitnamipython |
< 3.16.0→ 3.16.0 |
3.16.0 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-115791 python3 Fix available
- Debian DEBIAN-CVE-2026-115791 python3.15, python3.14, python3.13 +1 more No fixed version in this record
- Ubuntu UBUNTU-CVE-2026-115791 python3.14, python3.12, python3.11 +8 more No fixed version in this record
Original description The description as published by the source.
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.
Source: Python security-announce NVD GitHub Advisory
References
- advisory mail.python.org
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- PYTHON-SECURITY-ANNOUNCE [Security-announce][CVE-2026-115791] Prevent shadowing stdlib in gzip/tarfile/zipfile CLI
- report github.com
- web mail.python.org
- web github.com
- web openwall.com