Skip to content
Medium 5.3

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

CVE-2026-115791 First seen on SecPulse

Affected packages

PackageAffected → Fixed
Python Software FoundationCPython
< 3.16.0→ 3.16.0
Bitnamipython-min
< 3.16.0→ 3.16.0
Bitnamilibpython
< 3.16.0→ 3.16.0
Bitnamipython
< 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.

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

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details