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.
Published: 2025-06-03
Score: 7.5 High
EPSS: 1.0% Low
KEV: No
Impact: Local arbitrary file write
Action: Apply patch
AI Analysis

Impact

The vulnerability allows the tarfile extraction filter to be ignored. An attacker can create a tar archive that contains symbolic links pointing outside the intended extraction directory. When the archive is extracted with TarFile.extractall() or extract() and the filter parameter is set to "data" or "tar", the library will follow those links and write files at the target locations, modifying or creating arbitrary files and metadata. This constitutes a CWE-22, allowing local systems to perform arbitrary file writes and potentially gain elevated privileges.

Affected Systems

The issue exists in the CPython implementation distributed by the Python Software Foundation. It affects systems running CPython versions before the applied patches, including those bundled with Red Hat Enterprise Linux 8 and 9, RHEL AUS, RHEL E4S, RHEL EUS, RHEL TUS, and RHEL 10 derivatives as enumerated by the provided CPE strings.

Risk and Exploitability

The CVSS score of 7.5 indicates a high impact potential when the flaw is exercised. The EPSS score of 1% modestly indicates that exploitation is not yet widespread but remains feasible. The vulnerability is not listed in the CISA KEV catalog, so no large‑scale publicly executed exploits are known. An attacker requires local code execution to supply a crafted tar archive; once executed, the attacker can overwrite files outside the designated extraction directory, leading to data corruption or privilege escalation if privileged processes extract the archive.

Generated by OpenCVE AI on April 22, 2026 at 11:29 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade CPython to a patched release that disables the extraction filter bypass (e.g., move to the latest 3.14 or later version that contains the fix).
  • If an immediate upgrade is not possible, avoid extracting untrusted tar archives with TarFile.extractall() or extract() using the filter values "data" or "tar"; perform such operations in a sandboxed or isolated environment.
  • As a temporary mitigation, validate all extracted file paths before extraction or use a custom extraction routine that enforces that symlink targets remain within the intended destination directory.

Generated by OpenCVE AI on April 22, 2026 at 11:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
EUVD EUVD EUVD-2025-16737 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.
Ubuntu USN Ubuntu USN USN-7583-1 Python vulnerabilities
History

Wed, 09 Jul 2025 02:30:00 +0000

Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:8.8
cpe:/a:redhat:rhel_eus_long_life:8.8
cpe:/a:redhat:rhel_tus:8.8

Tue, 08 Jul 2025 02:45:00 +0000

Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel E4s
Redhat rhel Eus Long Life
Redhat rhel Tus
CPEs cpe:/a:redhat:rhel_aus:8.6
cpe:/a:redhat:rhel_e4s:8.6
cpe:/a:redhat:rhel_eus_long_life:8.6
cpe:/a:redhat:rhel_tus:8.6
Vendors & Products Redhat rhel Aus
Redhat rhel E4s
Redhat rhel Eus Long Life
Redhat rhel Tus

Wed, 02 Jul 2025 14:45:00 +0000

Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:enterprise_linux:10.0
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9

Wed, 02 Jul 2025 02:30:00 +0000

Type Values Removed Values Added
First Time appeared Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:8
Vendors & Products Redhat enterprise Linux

Tue, 01 Jul 2025 02:30:00 +0000

Type Values Removed Values Added
First Time appeared Redhat
Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.4
Vendors & Products Redhat
Redhat rhel Eus

Fri, 20 Jun 2025 06:45:00 +0000

Type Values Removed Values Added
References

Fri, 06 Jun 2025 19:00:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 05 Jun 2025 14:15:00 +0000

Type Values Removed Values Added
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. 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 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. 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.

Tue, 03 Jun 2025 21:00:00 +0000


Tue, 03 Jun 2025 15:30:00 +0000


Tue, 03 Jun 2025 15:00:00 +0000


Tue, 03 Jun 2025 14:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 03 Jun 2025 13:45:00 +0000

Type Values Removed Values Added
References

Tue, 03 Jun 2025 13:30:00 +0000


Tue, 03 Jun 2025 13:15:00 +0000

Type Values Removed Values Added
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. 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 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.
Title Extraction filter bypass for linking outside extraction directory
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}


Subscriptions

Redhat Enterprise Linux Rhel Aus Rhel E4s Rhel Eus Rhel Eus Long Life Rhel Tus
cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-04-21T20:16:19.312Z

Reserved: 2025-05-05T15:05:14.302Z

Link: CVE-2025-4330

cve-icon Vulnrichment

Updated: 2025-06-03T13:27:35.924Z

cve-icon NVD

Status : Deferred

Published: 2025-06-03T13:15:20.503

Modified: 2026-04-15T00:35:42.020

Link: CVE-2025-4330

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-06-03T12:58:57Z

Links: CVE-2025-4330 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-22T11:30:15Z

Weaknesses