Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-8869: Vulnerability in Python Packaging Authority pip

0
Medium
VulnerabilityCVE-2025-8869cvecve-2025-8869
Published: Wed Sep 24 2025 (09/24/2025, 14:56:56 UTC)
Source: CVE Database V5
Vendor/Project: Python Packaging Authority
Product: pip

Description

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.

AI-Powered Analysis

AILast updated: 11/03/2025, 18:17:33 UTC

Technical Analysis

CVE-2025-8869 addresses a vulnerability in the Python Packaging Authority's pip tool related to the extraction of tar archives. Specifically, when pip extracts tar files, it may fail to verify that symbolic links within the archive point inside the intended extraction directory if the underlying Python tarfile module does not implement PEP 706. This vulnerability exists in pip's fallback tar extraction code used by Python versions prior to those implementing PEP 706. The failure to properly check symbolic links can allow an attacker to craft malicious tar archives that, when installed, cause files to be written outside the target directory, potentially overwriting critical files or executing arbitrary code. The vulnerability requires no privileges and can be triggered by a user installing a malicious package, thus requiring user interaction but no authentication. The CVSS 4.0 score is 5.9 (medium), reflecting network attack vector, low attack complexity, no privileges required, user interaction needed, and high impact on integrity. Mitigations include upgrading pip to a fixed version, upgrading Python to versions implementing PEP 706 (>=3.9.17, >=3.10.12, >=3.11.4, or >=3.12), applying patches, or manually inspecting source distributions before installation. The vulnerability does not affect pip running on secure Python versions and no known exploits have been reported in the wild to date.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to software development, DevOps, and CI/CD pipelines that rely on pip for Python package management. Exploitation could lead to arbitrary file writes outside the intended directories, potentially overwriting system or application files, leading to code execution or system compromise. This could disrupt business operations, compromise data integrity, and expose sensitive information. Organizations with automated package installation processes or those that install packages from untrusted or public repositories are particularly vulnerable. The medium severity indicates a moderate risk, but the widespread use of Python and pip in European enterprises, academia, and government increases the potential impact. Additionally, organizations that have not upgraded to recent Python versions implementing PEP 706 remain exposed. The lack of known exploits reduces immediate risk but does not eliminate the threat, especially as attackers may develop exploits targeting this vulnerability.

Mitigation Recommendations

European organizations should implement a multi-layered mitigation strategy: 1) Upgrade pip to the latest fixed version that addresses this vulnerability. 2) Upgrade Python interpreters to versions implementing PEP 706 (Python >=3.9.17, >=3.10.12, >=3.11.4, or >=3.12) to avoid fallback to vulnerable tar extraction code. 3) Apply any available patches to pip or the tarfile module if upgrading is not immediately feasible. 4) Enforce strict code review and manual inspection of source distributions (sdists) before installation, especially from untrusted sources. 5) Integrate security scanning tools in CI/CD pipelines to detect malicious package contents or suspicious symbolic links. 6) Educate developers and DevOps teams about the risks of installing packages from unverified sources and the importance of using updated tooling. 7) Monitor Python package repositories and security advisories for updates or emerging exploits related to this vulnerability. These steps go beyond generic advice by emphasizing Python version upgrades, manual inspection, and pipeline integration.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
PSF
Date Reserved
2025-08-11T15:55:10.199Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68d487f92f6beace9efc3584

Added to database: 9/25/2025, 12:08:25 AM

Last enriched: 11/3/2025, 6:17:33 PM

Last updated: 11/9/2025, 10:18:42 PM

Views: 627

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats