CVE Catalog

CVE-2025-8869

MediumCVSS 5.9
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.47%

38th 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
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