CVE-2026-115791Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction
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.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | python3.14 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 26.04 | python3.14 | Under investigation | UBUNTU-CVE-2026-115791 | |
| Ubuntu 24.04 | python3.12 | Under investigation | UBUNTU-CVE-2026-115791 | |
| Ubuntu 22.04 | python2.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 22.04 | python3.10 | Under investigation | UBUNTU-CVE-2026-115791 | |
| Ubuntu 22.04 | python3.11 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 20.04 | python2.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 20.04 | python3.8 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 20.04 | python3.9 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 18.04 | python2.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 18.04 | python3.6 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 18.04 | python3.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 18.04 | python3.8 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 16.04 | python2.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 16.04 | python3.5 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 14.04 | python2.7 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 14.04 | python3.4 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Ubuntu 14.04 | python3.5 | Fix pending | UBUNTU-CVE-2026-115791 | |
| Debian 14 | python3.14 | Fix pending | DEBIAN-CVE-2026-115791 | |
| Debian 14 | python3.15 | Fix pending | DEBIAN-CVE-2026-115791 | |
| Debian 13 | python3.13 | Fix pending | DEBIAN-CVE-2026-115791 | |
| Debian 12 | python3.11 | Fix pending | DEBIAN-CVE-2026-115791 |
What the vendor says
As published in the CVE record by PSF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Python Software Foundation CPython: affected: before 3.16.0; fixed in
3.16.0
Vendor advisories:
- https://github.com/python/cpython/pull/161706 (patch)
- https://mail.python.org/archives/list/security-announce@python.org/thread/ZKKA4Q7B35JEHSD… (vendor-advisory)
References
- https://github.com/python/cpython/issues/161705
- https://github.com/python/cpython/pull/161706
- https://mail.python.org/archives/list/security-announce@python.org/thread/ZKKA4Q7B35JEHSDIJNZ6TYKRDQJUHDAG/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.