cve.bz

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

5.3 mediumEPSS 0.2%

Medium (5.3) in python software foundation cpython. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

5.3 medium
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
EPSS
0.2% estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-13. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-11-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-829 Inclusion of Functionality from Untrusted Control Sphere
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
Assigned by
PSF (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-115791 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-115791?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-115791?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-115791 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-115791

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-115791](https://cve.bz/cve/badge/CVE-2026-115791.svg)](https://cve.bz/cve/CVE-2026-115791)

HTML:

<a href="https://cve.bz/cve/CVE-2026-115791"><img src="https://cve.bz/cve/badge/CVE-2026-115791.svg" alt="CVE-2026-115791"></a>

Affected

  • python software foundation:cpython

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.16.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu22.04:LTSpython3.10no fix listedUBUNTU-CVE-2026-115791
Ubuntu24.04:LTSpython3.12no fix listedUBUNTU-CVE-2026-115791
Ubuntu26.04:LTS, 26.10python3.14no fix listedUBUNTU-CVE-2026-115791
UbuntuPro:14.04:LTSpython2.7, python3.4, python3.5no fix listedUBUNTU-CVE-2026-115791
UbuntuPro:16.04:LTSpython2.7, python3.5no fix listedUBUNTU-CVE-2026-115791
UbuntuPro:18.04:LTSpython2.7, python3.6, python3.7 and 1 moreno fix listedUBUNTU-CVE-2026-115791
UbuntuPro:20.04:LTSpython2.7, python3.8, python3.9no fix listedUBUNTU-CVE-2026-115791
UbuntuPro:22.04:LTSpython2.7, python3.11no fix listedUBUNTU-CVE-2026-115791
Azure Linux3python-pyno fix listedAZL-113326
Azure Linux3python3no fix listedAZL-113332
Azure Linux3tensorflowno fix listedAZL-113639

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-829 (13).

References

Check your stackJSON