Impact
The tarfile module’s tar_filter function can be bypassed with specially crafted symlink entries that have empty names or mimic directory names. When such a symlink appears, the filter fails to keep the extraction path within the intended destination, allowing tarfile.extractall(filter="tar") to write files outside the target directory. This flaw results in the creation or overwrite of arbitrary files, and the outcome depends on the permissions of the process performing the extraction. Based on the description, the vulnerability maps to CWE‑22, improper pathname validation.
Affected Systems
Any installation of Python Software Foundation’s CPython that invokes tarfile.extractall with filter="tar" is at risk. The CVE entry does not list specific CPython releases or versions, so all versions that have not applied the fix are potentially affected regardless of the Python release number.
Risk and Exploitability
The vulnerability has a CVSS score of 6.9, indicating a moderately serious risk. The EPSS score is not available, and the flaw is not yet listed in the CISA KEV catalog. The likely attack vector is a malicious tar archive supplied to an application that calls tarfile.extractall with the standard filter. Based on the description, it is inferred that an attacker can write files to arbitrary locations on the file system as long as the extracting process has sufficient permissions, which may lead to data tampering, privilege escalation, or the introduction of malicious code.
OpenCVE Enrichment