UBUNTU-CVE-2026-115791: Medium severity ubuntu/python2.7 vulnerability

Published Nov 12, 2026
·
Updated

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 Software

17 affected components
ubuntu/python2.7*
ubuntu/python3.4*
ubuntu/python3.5*
ubuntu/python2.7*
ubuntu/python3.5*
ubuntu/python2.7*
ubuntu/python3.6*
ubuntu/python3.7*
ubuntu/python3.8*
ubuntu/python2.7*
ubuntu/python3.9*
ubuntu/python3.10*
ubuntu/python2.7*
ubuntu/python3.11*
ubuntu/python3.12*
ubuntu/python3.14*
ubuntu/python3.14*

Event History

Nov 12, 2026
CVE Published
via OSV·12:00 AM
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Users or automated processes that use the tarfile, zipfile, or gzip Python command-line interfaces to decompress archives in their current working directory are exposed. The listed affected Ubuntu packages include python2.7 and Python 3.4 through 3.9, as well as python3.14.

2

What does an attacker need to exploit it?

An attacker needs to supply an archive containing a Python file that shadows a standard-library module, such as traceback.py. An error must then occur while decompressing a subsequent file, causing Python to import and execute the extracted shadowing file.

3

Are normal archive extraction workflows affected?

The issue specifically concerns the Python tarfile, zipfile, and gzip command-line interfaces, where extraction occurs in the current directory and Python is invoked with python -m MODULE. The supplied data does not establish impact for other archive extraction tools or library API use.

4

What changes in the fix?

The fix removes sys.path[0] from the gzip, tarfile, and zipfile command-line interfaces. This prevents files extracted into the current directory from shadowing standard-library modules during error handling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203