CVE-2025-4330
Published: 03 June 2025
Summary
CVE-2025-4330 is a high-severity Path Traversal (CWE-22) vulnerability in Python (inferred from references). Its CVSS base score is 7.5 (High).
Operationally, ranked in the top 22.5% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
Deeper analysis
The vulnerability CVE-2025-4330 is a path traversal flaw (CWE-22) in Python's tarfile module that permits the configured extraction filter to be bypassed. It affects TarFile.extractall() and TarFile.extract() calls that specify filter="data" or filter="tar", including the new default filter behavior introduced in Python 3.14; the result allows symlink targets to escape the destination directory and permits modification of selected file metadata.
An attacker who can supply a malicious tar archive can exploit the issue over the network without authentication or user interaction whenever a victim application extracts the archive using the affected filters. Successful exploitation grants the ability to write files outside the intended directory and alter metadata, producing high-integrity impact as reflected in the CVSS 7.5 score.
Official mitigation guidance and patches are documented in the referenced CPython commits and the tarfile extraction-filter documentation; users should apply the updates or avoid the vulnerable filter settings when handling untrusted archives. The advisory notes that source-distribution tarballs are not significantly affected because they already permit arbitrary code execution at build time, yet it still recommends avoiding installation of distributions that contain suspicious links. The associated EPSS score has remained flat at 0.0101 with no material increase.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-16737
Vulnerability details
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…
more
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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Validates pathnames and filenames to prevent traversal outside intended directories.