CVE-2026-115791: Prevent shadowing stdlib in gzip/tarfile/zipfile CLI during extraction

Published Nov 10, 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.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Remove sys.path[0] when running the gzip, tarfile, and zipfile command-line interfaces to prevent extracted Python scripts from shadowing standard library modules.

    Python gzip, tarfile, and zipfile command-line interfaces sys.path[0] = removed

Event History

Nov 10, 2026
CVE Published
via MITRE·04:33 PM
Data Sourced
via MITRE·04:33 PM
Description

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