CVE-2026-115791
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.
Weakness
- CWE-829: Inclusion of Functionality from Untrusted Control Sphere
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-11-10 |
Timeline
- 2026-11-10Published by the CNA16:33 UTC
- 2026-11-10CISA SSVC decision recordedsame day
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| python_software_foundation cpython | from 0 before 3.16.0fixed in 3.16.0 | 3.16.0 |
References
- https://github.com/python/cpython/pull/161706
- https://mail.python.org/archives/list/security-announce@python.org/thread/ZKKA4Q7B35JEHSDIJNZ6TYKRDQJUHDAG/
- http://www.openwall.com/lists/oss-security/2026/11/10/30
- https://github.com/python/cpython/issues/161705
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-115791'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-115791'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-115791'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-115791'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).