# CVE-2026-115791: Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction

- Severity: Medium 5.3 (CVSS:4.0, scored by PSF) `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-11-10T16:33:49.360Z
- Modified: 2026-11-27T06:56:20.973Z
- Also known as: BIT-LIBPYTHON-2026-115791, BIT-PYTHON-2026-115791, BIT-PYTHON-MIN-2026-115791
- Weaknesses: CWE-829
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: PSF

## Description

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.

(As written by CVE List.)

## Affected

- Python Software Foundation CPython: before 3.16.0
- libpython (Bitnami): before 3.16.0
- python (Bitnami): before 3.16.0
- python-min (Bitnami): before 3.16.0

## Every score

- PSF: CVSS:4.0 5.3 Medium `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/python/cpython/issues/161705> (issue-tracking, web)
- <https://github.com/python/cpython/pull/161706> (patch, web)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/ZKKA4Q7B35JEHSDIJNZ6TYKRDQJUHDAG/> (vendor-advisory, web)
- <http://www.openwall.com/lists/oss-security/2026/11/10/30> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-115791> (web)

## Sources

- CVE List: [CVE-2026-115791](https://www.cve.org/CVERecord?id=CVE-2026-115791), CVE Terms of Use, modified 2026-11-11
- NVD: [CVE-2026-115791](https://nvd.nist.gov/vuln/detail/CVE-2026-115791), Public domain, modified 2026-11-11
- Bitnami Vulnerability Database: [BIT-LIBPYTHON-2026-115791](https://osv.dev/vulnerability/BIT-LIBPYTHON-2026-115791), Apache-2.0, modified 2026-11-27
- Bitnami Vulnerability Database: [BIT-PYTHON-2026-115791](https://osv.dev/vulnerability/BIT-PYTHON-2026-115791), Apache-2.0, modified 2026-11-27
- Bitnami Vulnerability Database: [BIT-PYTHON-MIN-2026-115791](https://osv.dev/vulnerability/BIT-PYTHON-MIN-2026-115791), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-115791 · Whole record: https://cve.day/CVE-2026-115791.json · Rebuilt by cve.day 2026-11-27T07:07:35.750Z
