CVE-2025-8869: Pip Pip's Fallback Tar Extraction Doesn't Vulnerability
MODERATECVE-2025-8869 is a MODERATE pip's fallback tar extraction doesn't vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Pip libraries in the PyPI ecosystem. The issue involves pip's fallback tar extraction doesn't check symbolic links point to extraction directory. Remediation is available by upgrading affected packages to version 25.3.
CVE-2025-8869 at a Glance
How to Fix CVE-2025-8869
To remediate this vulnerability, upgrade all affected Pip dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pip>=25.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pip
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-8869, inspect your installed packages using pip:
pip show pip
Analyze the terminal output to locate any version of Pip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.3), your application is affected.
Note: The pip show pip command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Pip, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-8869 Affected Pip Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pip
|
PyPI |
< 25.3
|
25.3
|
References
Frequently Asked Questions
What is CVE-2025-8869?
Which Pip versions are affected?
What version fixes CVE-2025-8869?
Is pip affected?
What CWE is associated with CVE-2025-8869?
How can I check PyPI dependencies for CVE-2025-8869?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4xh5-x5gv-qwph",
"modified" : "2025-12-19T16:46:01Z",
"published" : "2025-09-24T15:31:14Z",
"aliases" : [ "CVE-2025-8869" ],
"summary" : "pip's fallback tar extraction doesn't check symbolic links point to extraction directory",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pip"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "25.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 25.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-8869"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/pip/pull/13550"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/pip/commit/f2b92314da012b9fffa36b3f3e67748a37ef464a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pypa/pip"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/10/msg00028.html"
}, {
"type" : "WEB",
"url" : "https://mail.python.org/archives/list/security-announce@python.org/thread/IF5A3GCJY3VH7BVHJKOWOJFKTW7VFQEN"
}, {
"type" : "WEB",
"url" : "https://pip.pypa.io/en/stable/news/#v25-2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-59" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-24T20:04:58Z",
"nvd_published_at" : "2025-09-24T15:15:41Z"
}
}