Code Execution Vulnerability in Python's Archive Decompression Tools
CVE-2026-115791
5.3MEDIUM
What is CVE-2026-115791?
This vulnerability allows the creation of a Python script that can shadow standard library modules during the extraction of compressed archives using the command line interface for tarfile or zipfile. If an error arises during the extraction of files, this rogue script, especially if named traceback.py, can inadvertently be executed due to Python’s inclusion of the current directory in sys.path when accessing modules. The identified fix addresses this issue by eliminating sys.path[0] in gzip, tarfile, and zipfile command line interfaces, thereby bolstering security against unintended code execution.
Affected Version(s)
CPython 0 < 3.16.0
References
CVSS V4
Score:
5.3
Severity:
MEDIUM
Confidentiality:
High
Integrity:
High
Availability:
None
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
Unknown
Timeline
Vulnerability published
Vulnerability Reserved
Credit
Jelle Zijlstra (https://github.com/jelle-openai)
Victor Stinner (https://github.com/vstinner)
Ethan Furman (https://github.com/ethanfurman)
Kirill Podoprigora (https://github.com/Eclips4)
Seth Larson (https://github.com/sethmlarson)
