CVE-2026-115791
JSON

5.3medium

Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction

Severity
5.3medium CVSS:4.0 by PSF
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PSF
Also known as
BIT-LIBPYTHON-2026-115791BIT-PYTHON-2026-115791BIT-PYTHON-MIN-2026-115791

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.

Affected

Product or packageVersionsReported by
Python Software Foundation CPythonbefore 3.16.0CVE List
libpython (Bitnami)before 3.16.0Bitnami Vulnerability Database
python (Bitnami)before 3.16.0Bitnami Vulnerability Database
python-min (Bitnami)before 3.16.0Bitnami Vulnerability Database

All scores

PSF5.3medium CVSS:4.0CVSS: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 Databasemedium rating

Classification

CWE-829

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-115791 changed 2026-11-11CVE Terms of Use
NVDCVE-2026-115791 changed 2026-11-11Public domain
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2026-115791 changed 2026-11-27Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2026-115791 changed 2026-11-27Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2026-115791 changed 2026-11-27Apache-2.0