SecurityContext

CVE-2026-115791: Python tarfile & zipfile - Code Execution

  • Cve: CVE-2026-115791
  • Name: Python tarfile & zipfile - Code Execution
  • 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.
  • Impact: Attackers can execute arbitrary Python code when a crafted archive is decompressed, potentially leading to full system compromise.
  • Remediation: Update to the latest Python version that includes the fix removing sys.path[0] in gzip, tarfile, and zipfile CLI.
  • Vulnerability impact: remote_code_execution
  • Requirement type: user_interaction
  • Requirements: Attacker needs to provide a crafted archive that is decompressed via CLI
  • Labels source: securitycontext
  • Severity: medium
  • Cvss score: 5.3
  • Cvss vector: 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Epss score: 0.00162
  • Epss percentile: 0.05263
  • Assignee: [email protected]
  • Published at: 2026-11-10T17:17:22Z
  • Age in days: 14
  • Modified at: 2026-11-11T05:19:25Z
  • Patch available: yes
  • References total: 4
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-115791
  • Nvd status: awaiting_analysis
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: vulnerability type, hackerone

Cwe

IdName
CWE-829Inclusion of Functionality from Untrusted Control Sphere

References

Same in every row:

  • Source: nvd
  • Tags:
Url
https://github.com/python/cpython/issues/161705
https://github.com/python/cpython/pull/161706
https://mail.python.org/archives/list/[email protected]/thread/ZKKA4Q7B35JEHSDIJNZ6TYKRDQJUHDAG/
http://www.openwall.com/lists/oss-security/2026/11/10/30

Products

ProductAffectedPlatform boundSourcesUrl
python:python< 3.16.0nocna_alias/v1/products/python/python

Projects

RepositoryLink kindsIndexedUrl
python/cpythonfix, issues, pullyes/v1/repositories/python/cpython

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 5115604
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports