MODERATE 5.3

CVE-2026-115791

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

Preliminary: affected artifacts were inferred from the fix commits of the source repository and have not been reviewed yet. They will be replaced by the reviewed advisory when it is published.

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 Maven artifacts (1)

ArtifactAffected versionsFixed in
com.chaquo.python » pythonpreliminary
< 3.16.0
3.16.0

Blast radius

1affected artifacts
12affected versions
0dependent artifacts (est.)
0dependent versions

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.