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
Share secrets securely
Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.
Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.
- • Encrypted identity
- • Private Spaces for organizations and teams
- • End-to-end encrypted chat, calls, files, and notes
- • Sensitive AI work and protected collaboration
- • Built for information that cannot leak
Our mission is to secure human work alongside AI.
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.
