CVE-2025-8869
MediumCVSS 5.9Exploitation Probability (EPSS)
Low risk38th percentile - higher than 38% of all known CVEs
Summary
When extracting a tar archive, pip may not check that symbolic links point into the extraction directory if the tarfile module does not implement PEP 706. This vulnerability only affects Python versions that do not implement PEP 706, and upgrading pip alone does not fix all tarfile-related issues. It is recommended to use a Python version with PEP 706 or a patched pip.
Risk Assessment
An attacker could use a malicious tar archive to write files outside the target directory, potentially overwriting system files or achieving code execution.
Recommendation
Upgrade pip to a fixed version or switch to a Python version implementing PEP 706 (>=3.9.17, >=3.10.12, >=3.11.4, >=3.12). Inspect source distributions (sdists) before installation as a best practice.
Other vulnerabilities in pip
See all- CVE-2019-20916High
The pip package before version 19.2 for Python is vulnerable to directory traversal when a URL is provided in an install command. An attacker can exploit a Content-Disposition header containing '../' in the filename to overwrite files, such as /root/.ssh/authorized_keys.
- CVE-2023-5752Low
A vulnerability in pip prior to version 23.3 allows injecting arbitrary configuration options into the 'hg clone' call when installing a package from a Mercurial VCS URL (hg+...). An attacker can control Mercurial configuration, modifying how and what is cloned.
- CVE-2026-13346Medium
pip incorrectly handles doubly-encoded package URLs from indexes, allowing files to be installed to arbitrary disk locations when installing wheels. This vulnerability requires downloading or installing a package from a malicious index; malicious packages alone cannot exploit it.
- CVE-2026-8643Medium
In pip, console_scripts and gui_scripts were treated as paths instead of file names without sanitizing the resolved absolute path to the installation directory, leading to entry points being installed outside the installation directory.
Original NVD description (English source)
When extracting a tar archive pip may not check symbolic links point into the extraction directory if the tarfile module doesn't implement PEP 706. Note that upgrading pip to a "fixed" version for this vulnerability doesn't fix all known vulnerabilities that are remediated by using a Python version that implements PEP 706. Note that this is a vulnerability in pip's fallback implementation of tar extraction for Python versions that don't implement PEP 706 and therefore are not secure to all vulnerabilities in the Python 'tarfile' module. If you're using a Python version that implements PEP 706 then pip doesn't use the "vulnerable" fallback code. Mitigations include upgrading to a version of pip that includes the fix, upgrading to a Python version that implements PEP 706 (Python >=3.9.17, >=3.10.12, >=3.11.4, or >=3.12), applying the linked patch, or inspecting source distributions (sdists) before installation as is already a best-practice.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

