CVE-2026-115791

NameCVE-2026-115791
DescriptionWhen 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python3.11 (PTS)bookworm3.11.2-6+deb12u8vulnerable
bookworm (security)3.11.2-6+deb12u9vulnerable
python3.13 (PTS)trixie3.13.5-2+deb13u5vulnerable
python3.14 (PTS)forky, sid3.14.10-1vulnerable
python3.15 (PTS)forky, sid3.15.2-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python3.11source(unstable)(unfixed)
python3.13source(unstable)(unfixed)
python3.14source(unstable)(unfixed)
python3.15source(unstable)(unfixed)

Notes

[trixie] - python3.13 <no-dsa> (Minor issue)
https://github.com/python/cpython/issues/161705
https://github.com/python/cpython/pull/161706
https://github.com/python/cpython/commit/673607ef5362c62144fb7c3a78cf6d66dffd5bfb (3.15 branch)
https://github.com/python/cpython/commit/8aa5d657e4d3f1a4cca5ff6c976e2e868e0a9056 (3.14 branch)
https://github.com/python/cpython/pull/161726 (3.13 branch)
https://github.com/python/cpython/pull/161728 (3.11 branch)

Search for package or bug name: Reporting problems