CVE-2025-4330
published 2025-06-03CVE-2025-4330: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file metadata…
PriorityP345high7.5CVSS 3.1
AVNACLPRNUINSUCNIHAN
EPSS
0.80%
52.6th percentile
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.
Affected
11 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | jython | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| debian | pypy3 | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| debian | python2.7 | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| debian | python3.11 | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| debian | python3.13 | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| debian | python3.9 | < pypy3 7.3.20+dfsg-2 (forky) | pypy3 7.3.20+dfsg-2 (forky) |
| msrc | azl3_python3_3.12.9-1_on_azure_linux_3.0 | — | — |
| msrc | azl3_tensorflow_2.16.1-9_on_azure_linux_3.0 | — | — |
| msrc | cbl2_python3_3.9.19-13_on_cbl_mariner_2.0 | — | — |
| msrc | cbl2_python3_3.9.19-14_on_cbl_mariner_2.0 | — | — |
| python_software_foundation | cpython | < 3.15.0 | 3.15.0 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
osv7.5HIGH
vendor_debian7.5LOW
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
tarfile.extractall() with the 'data' or 'tar' filter could be bypassed by a crafted archive where a hardlink references a symlink stored at a deeper name than the hardlink itself.
ghsa_unreviewed·2026-06-23·CVSS 7.5
CVE-2026-11940 [HIGH] CWE-22 tarfile.extractall() with the 'data' or 'tar' filter could be bypassed by a crafted archive where a hardlink references a symlink stored at a deeper name than the hardlink itself.
tarfile.extractall() with the 'data' or 'tar'
filter could be bypassed by a crafted archive where a hardlink
references a symlink stored at a deeper name than the hardlink itself.
The extraction fallback validated the symlink at it's archived location
but recreated it at the hardlink's shallower
path, letting a relative
target the filter judged contained escape the destination directory.
This allowed a malicious tar archive to create a symlink pointing
outside the destination, enabling out-of-destination file reads or
writes. This was an incomplete fix of CVE-2025-4330.
GHSA
GHSA-68pj-xrp5-vccj: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
ghsa_unreviewed·2025-06-03
CVE-2025-4330 [HIGH] CWE-22 GHSA-68pj-xrp5-vccj: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
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. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.
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 beha
OSV
CVE-2025-4330: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
osv·2025-06-03·CVSS 7.5
CVE-2025-4330 [HIGH] CVE-2025-4330: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
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 distribu
OSV
CVE-2025-4330: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
osv·2025-06-03·CVSS 7.5
CVE-2025-4330 [HIGH] CVE-2025-4330: Allows the extraction filter to be ignored, allowing symlink targets to point outside the destination directory, and the modification of some file met
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 distribution
Ubuntu
Python vulnerabilities
vendor_ubuntu·2025-06-19
CVE-2025-4517 Python vulnerabilities
Title: Python vulnerabilities
Summary: Python could be made to overwrite files.
It was discovered that Python incorrectly handled tar archive extraction
with the filtering option. An attacker could possibly use this issue to
modify files in arbitrary filesystem locations and cause data loss.
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
Extraction filter bypass for linking outside extraction directory
vendor_msrc·2025-06-10·CVSS 7.5
CVE-2025-4330 [HIGH] CWE-22 Extraction filter bypass for linking outside extraction directory
Extraction filter bypass for linking outside extraction directory
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
PSF: PSF
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Reference: https:/
Red Hat
cpython: python: Extraction filter bypass for linking outside extraction directory
vendor_redhat·2025-06-03·CVSS 7.5
CVE-2025-4330 [HIGH] CWE-22 cpython: python: Extraction filter bypass for linking outside extraction directory
cpython: python: Extraction filter bypass for linking outside extraction directory
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 o
Debian
CVE-2025-4330: jython - Allows the extraction filter to be ignored, allowing symlink targets to point ou...
vendor_debian·2025·CVSS 7.5
CVE-2025-4330 [HIGH] CVE-2025-4330: jython - Allows the extraction filter to be ignored, allowing symlink targets to point ou...
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 distribution
No detection rules found.
No public exploits indexed.
https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42fhttps://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951dahttps://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390ahttps://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2ehttps://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965ahttps://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2ahttps://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1https://github.com/python/cpython/issues/135034https://github.com/python/cpython/pull/135037https://mail.python.org/archives/list/[email protected]/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
2025-06-03
Published