CVE-2026-115791

Medium

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.

SeverityMedium
CVSS5.3
Exploit probability—
ProductCPython
PublishedNov 10, 2026
First seenNov 10, 2026
Weakness typeCWE-829CWE-829

How to fix

Affected products

ProductAffected versionsFixed in
Python Software Foundation CPythonv < 3.16.03.16.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.