CVE-2025-4330 Details
Description
Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file metadata. You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.
A vulnerability in the Python tarfile module allows extraction filters to be bypassed, enabling symlink targets to point outside the destination directory and modify certain file metadata. This issue affects Python versions 3.12 and later, including the 3.14 release, where the default filter setting was changed to 'data'. The vulnerability arises when extracting untrusted tar archives with the TarFile.extract() or TarFile.extractall() methods, using the filter parameter set to 'data' or 'tar'.
Users can upgrade to Python versions 3.12.11, 3.13.4, 3.14.5 or later, where this vulnerability has been fixed. If an upgrade is not possible, the extraction filter can be manually applied by normalizing link targets and rejecting links that contain parent directory segments before extraction.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 3, 2025CISA-ADP
Assessed Jun 3, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Python | >= 3.12, < 3.14 |
CPE
Remediation
| |
Change History
10 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 31, 2026 | CVE Modified | [email protected] |
| Jul 30, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 5, 2025 | CVE Modified | [email protected] |
| Jun 3, 2025 | CVE Modified | [email protected] |
| Jun 3, 2025 | CVE Modified | [email protected] |
| Jun 3, 2025 | CVE Modified | [email protected] |
| Jun 3, 2025 | CVE Modified | [email protected] |
| Jun 3, 2025 | New CVE Received | [email protected] |
Volerion