Overview
This report details the critical vulnerability CVE-2025-4330, affecting Python’s tarfile module. The vulnerability allows the extraction filter to be ignored, enabling symlink targets to point outside of the destination directory, and the modification of some file metadata. This could potentially lead to system compromise or data leakage, and is particularly pertinent to users of Python 3.14 or later.
Vulnerability Summary
CVE ID: CVE-2025-4330
Severity: Critical (CVSS: 7.5)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Potential system compromise or data leakage
Affected Products
Escape the Surveillance Era
Most apps won’t tell you the truth.
They’re part of the problem.
Phone numbers. Emails. Profiles. Logs.
It’s all fuel for surveillance.
Ameeba Chat gives you a way out.
- • No phone number
- • No email
- • No personal info
- • Anonymous aliases
- • End-to-end encrypted
Chat without a trace.
Product | Affected Versions
Python | 3.14 and later
How the Exploit Works
This vulnerability exploits a flaw in the tarfile module of Python where the extraction filter can be ignored. This allows for symlink targets to point outside the destination directory, potentially leading to unauthorized access to files or directories. Additionally, it enables the modification of some file metadata, presenting potential data integrity issues.
Conceptual Example Code
Below is a conceptual example of how this vulnerability might be exploited. This example illustrates the use of TarFile.extractall() with a malicious tar file that contains a symlink pointing to a sensitive file outside the extraction directory.
import tarfile
# Open the malicious tar file
with tarfile.open('malicious.tar', 'r') as tar:
# Extract all files, ignoring the extraction filter
tar.extractall(path='destination_directory', filter=None)
In this example, if ‘malicious.tar’ contains a symlink that points to a file outside ‘destination_directory’, the file would still be extracted due to the filter being ignored. This could potentially lead to unauthorized access to sensitive files.

